Popular Python recipes tagged "trace"http://code.activestate.com/recipes/langs/python/tags/trace/2011-04-29T02:23:37-07:00ActiveState Code RecipesHow 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>
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>