Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Wow, that's cool! Thanks for sharing that. Does Perl also have something similar to Python's "import pdb; pdb.set_trace()", which lets you drop into a debugger at a predefined location in your code? I've been finding that really helpful.

Knowing Perl, it probably is possible, and I just never learned about it.



... drop into a debugger at a predefined location in your code?

Add the line where you want the execution to stop:

    $DB::single = 1;
Then, run your program as:

    $ PERLDB_OPTS=NonStop perl -d program.pl
See: http://perldoc.perl.org/perldebug.html




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: