How to dump all (lexical) variables?

K

kj

I have a long-running program that fails sporadically at a particular
point in its execution. This is a "controlled failure", because
it is due to an assertion that is unexpectedly failing to hold.
To debug this, it would be really helpful if I could dump the values
of all the current variables (especially the lexical ones that are
"visible" at the point of failure) right before the program aborts.

Is there an simple way to do this?

TIA!

kynn
 
P

Peter Makholm

kj said:
To debug this, it would be really helpful if I could dump the values
of all the current variables (especially the lexical ones that are
"visible" at the point of failure) right before the program aborts.

The peek_my function from the PadWalker module might do what you want.

//Makholm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top