Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

A convenient way to debug your code

by sotona (Scribe)
on Oct 21, 2014 at 08:46 UTC ( [id://1104538]=perlquestion: print w/replies, xml ) Need Help??

sotona has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

I wonder is there any Perl debugger which allows you to attach to an exact process which runs a Perl script in order to debug one?

Also I wasn't able to find in any debugger I tried to use such a valuable feature like 'set next statement', which allows you to jump to any line in order to change, for instance, something before current statement to make it work properly.

Does anyone have any ideas?
Thank you in advance.

Replies are listed 'Best First'.
Re: A convenient way to debug your code (enbugger)
by tye (Sage) on Oct 21, 2014 at 13:07 UTC
Re: A convenient way to debug your code
by QM (Parson) on Oct 21, 2014 at 12:00 UTC
Re: A convenient way to debug your code
by Anonymous Monk on Oct 21, 2014 at 09:04 UTC

    I wonder is there any Perl debugger which allows you to attach to an exact process which runs a Perl script in order to debug one?

    only if that process was started with a debugger already attached (perl -d ... ) ... you cannot attach a debugger after the program is started without a debugger

Re: A convenient way to debug your code
by zentara (Archbishop) on Oct 21, 2014 at 13:11 UTC
Re: A convenient way to debug your code
by GotToBTru (Prior) on Oct 21, 2014 at 16:06 UTC

    You cannot modify the code while in the debugger. You can certainly view and change the values of any variables. And there is no debugger command to skip lines or re-execute lines. See debugger reference manual.

    1 Peter 4:10

      But you can augment the code by adding actions (see "h a" and "h A" when in the debugger). You can also (mostly) replace subroutines.

      - tye        

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1104538]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-03-29 12:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found