This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
FAQ sync.
[perl5.git] / pod / perldebug.pod
index 01f35e1..bb01bd3 100644 (file)
@@ -6,6 +6,10 @@ perldebug - Perl debugging
 
 First of all, have you tried using the B<-w> switch?
 
+
+If you're new to the Perl debugger, you may prefer to read
+L<perldebtut>, which is a tutorial introduction to the debugger .
+
 =head1 The Perl Debugger
 
 If you invoke Perl with the B<-d> switch, your script runs under the
@@ -182,10 +186,12 @@ accessible.
 =item /pattern/
 
 Search forwards for pattern (a Perl regex); final / is optional.
+The search is case-insensitive by default.
 
 =item ?pattern?
 
 Search backwards for pattern; final ? is optional.
+The search is case-insensitive by default.
 
 =item L
 
@@ -385,6 +391,11 @@ their C<$ENV{SHELL}> variable) will be used, which can interfere
 with proper interpretation of exit status or signal and coredump
 information.
 
+=item @ file
+
+Read and execute debugger commands from I<file>.  I<file> may itself contain
+C<@> commands.
+
 =item H -number
 
 Display last n commands.  Only commands longer than one character are
@@ -465,6 +476,8 @@ working example of something along the lines of:
 
 The debugger has numerous options settable using the C<O> command,
 either interactively or from the environment or an rc file.
+(./.perldb or ~/.perldb under Unix.)
+
 
 =over 12
 
@@ -553,6 +566,10 @@ next option:
 Length to truncate the argument list when the C<frame> option's
 bit 4 is set.
 
+=item C<windowSize>
+
+Change the size of code list window (default is 10 lines).
+
 =back
 
 The following options affect what happens with C<V>, C<X>, and C<x>
@@ -600,9 +617,11 @@ include lexicals in a module's file scope, or lost in closures.
 
 =back
 
-During startup, options are initialized from C<$ENV{PERLDB_OPTS}>.
-You may place the initialization options C<TTY>, C<noTTY>,
-C<ReadLine>, and C<NonStop> there.
+After the rc file is read, the debugger reads the C<$ENV{PERLDB_OPTS}>
+environment variable and parses this as the remainder of a `O ...'
+line as one might enter at the debugger prompt.  You may place the
+initialization options C<TTY>, C<noTTY>, C<ReadLine>, and C<NonStop>
+there.
 
 If your rc file contains:
 
@@ -906,12 +925,12 @@ interpret the information in that profile.
 
 =head1 Debugging regular expressions
 
-C<use re 'debug'> enables you to see the gory details of how the
-Perl regular expression engine works.  In order to understand this
-typically voluminous output, one must not only have some idea about
-about how regular expression matching works in general, but also
-know how Perl's regular expressions are internally compiled into
-an automaton.  These matters are explored in some detail in
+C<use re 'debug'> enables you to see the gory details of how the Perl
+regular expression engine works. In order to understand this typically
+voluminous output, one must not only have some idea about how regular
+expression matching works in general, but also know how Perl's regular
+expressions are internally compiled into an automaton. These matters
+are explored in some detail in
 L<perldebguts/"Debugging regular expressions">.
 
 =head1 Debugging memory usage
@@ -925,6 +944,7 @@ See L<perldebguts/"Debugging Perl memory usage"> for the details.
 
 You did try the B<-w> switch, didn't you?
 
+L<perldebtut>,
 L<perldebguts>,
 L<re>,
 L<DB>,
@@ -940,7 +960,7 @@ You cannot get stack frame information or in any fashion debug functions
 that were not compiled by Perl, such as those from C or C++ extensions.
 
 If you alter your @_ arguments in a subroutine (such as with C<shift>
-or C<pop>, the stack backtrace will not show the original values.
+or C<pop>), the stack backtrace will not show the original values.
 
 The debugger does not currently work in conjunction with the B<-W>
 command-line switch, because it itself is not free of warnings.