This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add perldelta entry for commit 4f46e52b00
[perl5.git] / pod / perldebug.pod
index d44ca14..4a2f07e 100644 (file)
@@ -105,7 +105,6 @@ that it's run through your pager, as in
 
 You may change the pager which is used via C<o pager=...> command.
 
-
 =item p expr
 X<debugger command, p>
 
@@ -270,15 +269,19 @@ X<debugger command, S>
 
 List subroutine names [not] matching the regex.
 
-=item t
+=item t [n]
 X<debugger command, t>
 
 Toggle trace mode (see also the C<AutoTrace> option).
+Optional argument is the maximum number of levels to trace below
+the current one; anything deeper than that will be silent.
 
-=item t expr
+=item t [n] expr
 X<debugger command, t>
 
 Trace through execution of C<expr>.
+Optional first argument is the maximum number of levels to trace below
+the current one; anything deeper than that will be silent.
 See L<perldebguts/"Frame Listing Output Examples"> for examples.
 
 =item b
@@ -301,6 +304,10 @@ don't use C<if>:
     b 237 ++$count237 < 11
     b 33 /pattern/i
 
+If the line number is C<.>, sets a breakpoint on the current line:
+
+    b . $n > 100
+
 =item b [file]:[line] [condition]
 X<breakpoint>
 X<debugger command, b>
@@ -353,6 +360,42 @@ X<debugger command, B>
 
 Delete all installed breakpoints.
 
+=item disable [file]:[line]
+X<breakpoint>
+X<debugger command, disable>
+X<disable>
+
+Disable the breakpoint so it won't stop the execution of the program. 
+Breakpoints are enabled by default and can be re-enabled using the C<enable>
+command.
+
+=item disable [line]
+X<breakpoint>
+X<debugger command, disable>
+X<disable>
+
+Disable the breakpoint so it won't stop the execution of the program. 
+Breakpoints are enabled by default and can be re-enabled using the C<enable>
+command.
+
+This is done for a breakpoint in the current file.
+
+=item enable [file]:[line]
+X<breakpoint>
+X<debugger command, disable>
+X<disable>
+
+Enable the breakpoint so it will stop the execution of the program. 
+
+=item enable [line]
+X<breakpoint>
+X<debugger command, disable>
+X<disable>
+
+Enable the breakpoint so it will stop the execution of the program. 
+
+This is done for a breakpoint in the current file.
+
 =item a [line] command
 X<debugger command, a>
 
@@ -603,7 +646,6 @@ X<debugger command, M>
 
 Display all loaded modules and their versions.
 
-
 =item man [manpage]
 X<debugger command, man>
 
@@ -935,9 +977,9 @@ X<backtrace> X<stack, backtrace>
 Here's an example of what a stack backtrace via C<T> command might
 look like:
 
-    $ = main::infested called from file `Ambulation.pm' line 10
-    @ = Ambulation::legs(1, 2, 3, 4) called from file `camel_flea' line 7
-    $ = main::pests('bactrian', 4) called from file `camel_flea' line 4
+    $ = main::infested called from file 'Ambulation.pm' line 10
+    @ = Ambulation::legs(1, 2, 3, 4) called from file 'camel_flea' line 7
+    $ = main::pests('bactrian', 4) called from file 'camel_flea' line 4
 
 The left-hand character up there indicates the context in which the
 function was called, with C<$> and C<@> meaning scalar or list
@@ -1010,7 +1052,7 @@ Another way to debug compile-time code is to start the debugger, set a
 breakpoint on the I<load> of some module:
 
     DB<7> b load f:/perllib/lib/Carp.pm
-  Will stop on load of `f:/perllib/lib/Carp.pm'.
+  Will stop on load of 'f:/perllib/lib/Carp.pm'.
 
 and then restart the debugger using the C<R> command (if possible).  One can use C<b
 compile subname> for the same purpose.