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".

In reply to Re^3: How can I print variable contents from the debugger non-interactively? by Marshall
in thread How can I print variable contents from the debugger non-interactively? by davehorner

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.