in reply to Re^2: How can I print variable contents from the debugger non-interactively?
in thread How can I print variable contents from the debugger non-interactively?

Hi Dave!

I was thinking of interactive debug commands.

I believe that you will find in Perl, that the debugger is seldom used because its not required. I have to use a debugger (mandatory) when I write assembly code, I very seldom use a debugger for C code and almost never use a debugger for Perl code - for me, the Perl debugger is a once in a decade event. I have never required the Perl debugger to solve a code problem.

I congratulate you on your curiosity and motivation to learn more about Perl!

Perl is an amazingly introspective language. A Perl user function can find out things that are just not possible for a C program.

Some useful stuff for debugging the caller stack is the Perl Caller() function.

Some "standard" functions:

$me = whoami(); $him = whowasi(); sub whoami { (caller(1))[3] } sub whowasi { (caller(2))[3] }
I recommend study of the caller() function for your "debug repertoire".
  • Comment on Re^3: How can I print variable contents from the debugger non-interactively?
  • Download Code