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.

      ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊