Actions and Command Execution
From inside the debugger, you can specify actions to be taken at particular times. You can also launch external programs.
aaCOMMANDaLINEaLINECOMMANDThis command sets an action to take before
LINEexecutes, or the current line ifLINEis omitted. For example, this prints out$fooevery time line 53 is reached:a 53 print "DB FOUND $foo\n"
If no
COMMANDis specified, the action on the specifiedLINEis deleted. With neitherLINEnorCOMMAND, the action on the current line is deleted.
AThe
Adebugger command deletes all actions.
<< ?<EXPR<<EXPRThe
<EXPRform specifies a Perl expression to be evaluated before every debugger prompt. You can add another expression with the<<EXPRform, list them with< ?, and delete them all with a plain<.>> ?>EXPR>>EXPRThe
>commands behave just like their<cousins but are executed after the debugger prompt instead of before.{{ ?{COMMAND{{COMMANDThe
{debugger commands behave just like<but specify a debugger command to be executed before the debugger prompt instead of a Perl expression. A warning is issued if you appear to have accidentally entered a block of code instead. If that’s what you really mean to do, write it with;{ ... }or evendo { ... }.!!NUMBER! –NUMBER!PATTERNA lone
!repeats the previous command. TheNUMBERspecifies which command from the history to execute; for instance,! 3executes the third command typed into the debugger. If a minus sign precedes theNUMBER, the commands are counted backward: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access