http://www.perlmonks.org?node_id=702703


in reply to Debugging a program

To answer your original question 2, the closest you can get with the stock perl debugger is its tracing output.

To enable tracing in the debugger use the t command. You don't get verbose comments like in your example. Instead each executed line is printed with line number information.

The amount of tracing information can be controlled with the frame debugger option. For example you can enable messages for entering/exiting subroutines, show subroutine parameters, show tied and referenced variables, or print the return values of subroutines.

If you want to trace certain sections in your code, you can set the $DB::trace variable to 1 to enable tracing, and to 0 to disable tracing. For details see perldeb