Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Enabling or disabliing the debugger at runtime

by diotalevi (Canon)
on Jul 16, 2007 at 05:38 UTC ( [id://626778]=note: print w/replies, xml ) Need Help??


in reply to Enabling or disabliing the debugger at runtime

Here's two nifty recipies for using a debugger at rumtime:

At any arbitrary moment. Perhaps you've got some process that's long running and you occasionally want to stop it, examine its contents and then tell it to continue. Presumably you'd do the moral equivalent of Enbugger->unimport to remove the debugger.

$SIG{USR1} = \ &start_debugger; sub start_debugger { require Enbugger; Enbugger->import; }

Start the debugger on exception.

$SIG{__DIE__} = sub { require Enbugger; Enbugger->import };

Please share your ideas. You're smart people, I like using other smart people's ideas!

⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

Replies are listed 'Best First'.
Re^2: Enabling or disabliing the debugger at runtime
by BrowserUk (Patriarch) on Jul 16, 2007 at 06:16 UTC

      That requires that perl be started with -d so ops are compiled as potential breakpoints. The point of Enbugger is that you don't have to use -d at all.

      I've also updated the root post to make this a little clearer. The point is to not have to use the -d command line parameter at all.

      ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2024-04-20 01:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found