Is there a module or some other support for putting a "debug break" statement in a script?
I'm playing around with an emulator and I'd like to be able to put break statements into the code being emulated to aid debugging the emulator. I can simply set a debugger breakpoint on a suitable statement in the emulator where the emulated break statement is parsed. But that needs me to set the breakpoint every time I start a debugging session. I'd rather have the breakpoint baked into the emulator code in some fashion.
Update: Corion in the CB pointed me at $DB::single = 1; documented in perldebug. This does exactly what I want including having no effect when I'm not running under the debugger.
In reply to Debug break statement? by GrandFather
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |