auto-debugging features?

Johannes Stezenbach yawyi at gmx.de
Sun Jun 4 08:49:31 EDT 2000


Steven D. Arnold <stevena at permanent.cc> wrote:
>I'd like a generic system-wide method of logging the activities of my 
>programs for debugging purposes.

[snip]

>Something that would be cool in such a debugging info utility:
>
>	- Notification on entry to a function.
>	- On entry to a function, list the parameters and values for the params.
>	- When data is changed, note the before and after values.
>	- When an if statement is executed, list the expressions that were 
>compared and the values of each.

Once apon a time I struggled with debugging and white-box
testing in an embedded interpreter. After a while of experimenting,
I came up with a little hack based on pythons sys.setprofile hook.
Once engaged, the module prints all function calls (with
arguments), returns and exceptions, plus optional timestamps.

While it was useful then, I admit I haven't used it myself ever
since. If you're still interested, you can find it in the bowels
of the Python FTP site:

ftp://ftp.python.org/pub/python/contrib-09-Dec-1999/System/wbtrace.README
ftp://ftp.python.org/pub/python/contrib-09-Dec-1999/System/wbtrace.py

Johannes




More information about the Python-list mailing list