Popular recipes tagged "trace" but not "inspection"http://code.activestate.com/recipes/tags/trace-inspection/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> How to debug (deadlocked) multi threaded programs (Python) 2010-07-26T15:39:15-07:00Laszlo Nagyhttp://code.activestate.com/recipes/users/4150221/http://code.activestate.com/recipes/577334-how-to-debug-deadlocked-multi-threaded-programs/ <p style="color: grey"> Python recipe 577334 by <a href="/recipes/users/4150221/">Laszlo Nagy</a> (<a href="/recipes/tags/dead/">dead</a>, <a href="/recipes/tags/debug/">debug</a>, <a href="/recipes/tags/lock/">lock</a>, <a href="/recipes/tags/stack/">stack</a>, <a href="/recipes/tags/thread/">thread</a>, <a href="/recipes/tags/trace/">trace</a>). </p> <p>Simple module that allows you to explore deadlocks in multi threaded programs.</p> Tiny trace/debug-logging tool with smart event filtering (Python) 2011-04-29T02:23:37-07:00Jan Kaliszewskihttp://code.activestate.com/recipes/users/4172762/http://code.activestate.com/recipes/577429-tiny-tracedebug-logging-tool-with-smart-event-filt/ <p style="color: grey"> Python recipe 577429 by <a href="/recipes/users/4172762/">Jan Kaliszewski</a> (<a href="/recipes/tags/debugging/">debugging</a>, <a href="/recipes/tags/logging/">logging</a>, <a href="/recipes/tags/trace/">trace</a>). Revision 3. </p> <ul> <li><p>Just import, call and log your selected call/return/exception/etc. events.</p></li> <li><p>You can use a standard Python logger from the <code>logging</code> module.</p></li> <li><p>Quite flexible tool and about 50 efective SLOC only (excluding the example script).</p></li> <li><p>For debugging rather than production environments (programs noticeably slow down).</p></li> </ul>