Having a perl debugger does not stop on first application

I am trying to find a way to start the perl process under the debugger, but just starting to start automatically, without stopping in the first expression and forcing me to enter "c" to start it. This module is controlled by a larger system, and I need to periodically (based on external conditions) interrupt the program through the interrupt signal, study some data structures and continue it.

Obviously, I may have a supervisor that starts my process using "perl -d myProcess", but how to get it working without an initial break. Does anyone know how to do this?

Many thanks.

+7
source share
2 answers

Thanks. It was a great hint. I see several options, including NonStop.

It seems like using the line PERLDB_OPTS="NonStop" perl -d myprog.pl & does the trick. Then I just kill -INT <pid> and fg to get it in the debugger. After I 'c' to continue execution and bg , it will continue.

+7
source

You can also add this configuration option to the .perldb file. The configuration file format is a bit unusual and not so well documented, so here goes

 DB::parse_options("NonStop=1"); 

Other useful options:

 DB::parse_options("dumpDepth=3"); DB::parse_options("PrintRet=0"); $DB::deep = 1000; 
+2
source

All Articles