Popular Tcl recipes tagged "debugging"http://code.activestate.com/recipes/langs/tcl/tags/debugging/2014-03-23T22:31:40-07:00ActiveState Code RecipesTrack Debug Package argument(s) are option(s) and/or a debug message to be saved to a file (Tcl) 2014-03-23T22:31:40-07:00Bert Byfieldhttp://code.activestate.com/recipes/users/4188497/http://code.activestate.com/recipes/578855-track-debug-package-arguments-are-options-andor-a-/ <p style="color: grey"> Tcl recipe 578855 by <a href="/recipes/users/4188497/">Bert Byfield</a> (<a href="/recipes/tags/debugging/">debugging</a>, <a href="/recipes/tags/pdisplay/">pdisplay</a>, <a href="/recipes/tags/ptrack/">ptrack</a>, <a href="/recipes/tags/trace/">trace</a>, <a href="/recipes/tags/track/">track</a>, <a href="/recipes/tags/tracklst/">tracklst</a>). </p> &lt;h4 id="package-require-tracks"&gt;package require tracks&lt;/h4&gt; &lt;h4 id="ptrack-on-off-clear-overflow-overflowgo-abend-104-message-text"&gt;pTrack ?-on? ?-off? ?-clear? ?-overflow? ?-overflowGo? ?-abend? ?"104 message text"?&lt;/h4&gt; <p>A user-specified text message is written to a file "tracklst.txt" in the same directory as the source program. Tracking can be turned on or off, and the clear option sets the file to zero bytes. The program defaults to raise an error if the tracklst.txt file gets too big (default is one megabyte), but the overflowGo option will cause it to just turn off tracking and continue. The abend option will raise an optional error. The message is whatever the user wants it to be, but suggested usage is to always start with three digits that identify a proc and a fourth alphabetic character that marks the track uniquely and allows searching for a specific track. Also includes pDisplay, which writes a debug message to a tk_messageBox dialog window.</p> <p>e.g.: pTrack -clear "Start a new test by emptying the track file" <br> pTrack "140d date adjusted to $tMon of $tYear" pTrack "135b Current working directory is [pwd]"</p> Lexing C (Tcl) 2002-08-22T16:34:35-07:00andreas kuprieshttp://code.activestate.com/recipes/users/117230/http://code.activestate.com/recipes/146223-lexing-c/ <p style="color: grey"> Tcl recipe 146223 by <a href="/recipes/users/117230/">andreas kupries</a> (<a href="/recipes/tags/debugging/">debugging</a>). </p> <p>Lexing C sources into a list of tokens. Demonstration of the string processing facilities of Tcl. The same approach will work for essentially all keyword based languages, for example Pascal, module, Eiffel, etc. &lt;p&gt; List and quoting based languages (Tcl itself, Lisp, ...) can be done too, but this is not optimal. &lt;p&gt; Author: Andreas Kupries &lt;br&gt; Original location: <a href="http://mini.net/tcl/3906&lt;br&gt;" rel="nofollow">http://mini.net/tcl/3906&lt;br&gt;</a></p> Repeat procedure every X seconds (Tcl) 2001-09-10T15:20:39-07:00Jeff Hobbshttp://code.activestate.com/recipes/users/98167/http://code.activestate.com/recipes/68393-repeat-procedure-every-x-seconds/ <p style="color: grey"> Tcl recipe 68393 by <a href="/recipes/users/98167/">Jeff Hobbs</a> (<a href="/recipes/tags/debugging/">debugging</a>). </p> <p>This is a cheap rescheduler that uses the built-in after command to repeat a command every X milliseconds. It has cancel and info commands similar to the after command.</p> Tk Window Dump (Tcl) 2001-09-11T05:29:53-07:00Donal Fellowshttp://code.activestate.com/recipes/users/99497/http://code.activestate.com/recipes/68399-tk-window-dump/ <p style="color: grey"> Tcl recipe 68399 by <a href="/recipes/users/99497/">Donal Fellows</a> (<a href="/recipes/tags/debugging/">debugging</a>). </p> <p>Dump an arbitrary widget to an image file of (almost) any kind by using XWD and ImageMagick.</p> Get widget info (Tcl) 2001-09-12T13:46:25-07:00peter bergerhttp://code.activestate.com/recipes/users/130527/http://code.activestate.com/recipes/68410-get-widget-info/ <p style="color: grey"> Tcl recipe 68410 by <a href="/recipes/users/130527/">peter berger</a> (<a href="/recipes/tags/debugging/">debugging</a>). </p> <p>This script creates a window with a button and text widget. You press the button, drag the cursor over the widget in question then release the mouse button. The text widget then displays all of the configuration options for the widget you released the button over.</p> Obtaining the name of a procedure (Tcl) 2001-06-21T16:28:41-07:00Jeff Hobbshttp://code.activestate.com/recipes/users/98167/http://code.activestate.com/recipes/65429-obtaining-the-name-of-a-procedure/ <p style="color: grey"> Tcl recipe 65429 by <a href="/recipes/users/98167/">Jeff Hobbs</a> (<a href="/recipes/tags/debugging/">debugging</a>). </p> <p>How to obtain the name of a procedure from within it.</p> A minimal debugger (Tcl) 2001-06-21T16:47:46-07:00Jeff Hobbshttp://code.activestate.com/recipes/users/98167/http://code.activestate.com/recipes/65431-a-minimal-debugger/ <p style="color: grey"> Tcl recipe 65431 by <a href="/recipes/users/98167/">Jeff Hobbs</a> (<a href="/recipes/tags/debugging/">debugging</a>). </p> <p>Of course, Tcl's most minimal debugger is puts. But here is a cute little piece of code that offers some more debugging functionality (if you have stdin and stdout available - so not for wish on Windows)</p> A minimal console (Tcl) 2001-06-21T16:44:30-07:00Jeff Hobbshttp://code.activestate.com/recipes/users/98167/http://code.activestate.com/recipes/65430-a-minimal-console/ <p style="color: grey"> Tcl recipe 65430 by <a href="/recipes/users/98167/">Jeff Hobbs</a> (<a href="/recipes/tags/debugging/">debugging</a>). </p> <p>The following 14-command codelet gives you a window with entry and text widget, where you type commands into the entry, hit Return, and get the results (or error message) of evaluating the entry content in the text widget.</p>