Wise monks,

Allow me to demonstrate what I'd like to do in terms of compiled C programs. First off, my environment is a Sun Solaris 8 box with Sun Workshop installed. Thus, my compiler is cc (used with the -g option). When compiled like this, I can use the workshop debugger to step through programs, evaluate variables, etc. Moreover, I can use workshop to attach to a running process (say, one that's in an infinite loop, or one that's hung) and see where in the code this running process is currently at and proceed with the standard debugging steps.

I'd like to be able to do the same with perl. In particular, I have a Tk GUI with a forked process (in effect a while(1) loop with brains). I'd like to attach a debugger to this forked process to see where it is during a particular time of execution, to see values of variables, etc. Is there any such tool? Free tools are, of course, prefered.

Thanks in advance.


In reply to debugging a running perl script by gri6507

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.