Popular recipes tagged "trace" but not "stack"http://code.activestate.com/recipes/tags/trace-stack/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> Trace decorator for debugging (Python) 2011-01-24T18:40:51-08:00Kevin L. Sitzehttp://code.activestate.com/recipes/users/4173535/http://code.activestate.com/recipes/577551-trace-decorator-for-debugging/ <p style="color: grey"> Python recipe 577551 by <a href="/recipes/users/4173535/">Kevin L. Sitze</a> (<a href="/recipes/tags/classes/">classes</a>, <a href="/recipes/tags/debug/">debug</a>, <a href="/recipes/tags/debugging/">debugging</a>, <a href="/recipes/tags/decorators/">decorators</a>, <a href="/recipes/tags/functions/">functions</a>, <a href="/recipes/tags/inspection/">inspection</a>, <a href="/recipes/tags/modules/">modules</a>, <a href="/recipes/tags/trace/">trace</a>). Revision 2. </p> <p>This package provides a decorator for tracing function and method calls in your applications. The tracing capabilities are managed through the logging package, and several mechanisms are provided for controlling the destination of the trace output.</p> <p>It also provides functionality for adding decorators to existing classes or modules.</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>