Module idea: Devel::DebugNow

jjore on 2007-06-28T19:57:56

Enables the debugging runloop whenever requested so instances of $^P setting can take effect regardless of whether the program was started with the -d parameter or not.


What about OP_DBSTATE?

jand on 2007-06-29T00:15:53

When you run perl without -d option, then you get OP_NEXTSTATE instead of OP_DBSTATE opcodes. Switching to the debugging runops loop doesn't fix this. Or am I missing something?

Re:What about OP_DBSTATE?

jjore on 2007-06-29T03:35:37

Nope, I guess it wouldn't change that. I don't know what an OP_DBSTATE is though. I've seen them but never looked at them.

Already works

educated_foo on 2007-06-29T17:29:22

...so this would be a very small module. AFAICT you can have what you want as long as the code was compiled with at least minimal $^P flags -- just toggle $DB::trace to enable or disable the debugger. I did this in Sepia, and it doesn't seem to cause any trouble. Surprisingly, $^P also has no measurable performance impact when done "right" (see this Perlmonks thread).