A mechanism for inlineable OP equivalents of XSUBs is a TODO.
[p5sagit/p5-mst-13.2.git] / pod / perldebug.pod
index 8c6e940..9e67b4d 100644 (file)
@@ -54,9 +54,33 @@ function with something that doesn't look like a debugger command, such
 as a leading C<;> or perhaps a C<+>, or by wrapping it with parentheses
 or braces.
 
+=head2 Calling the debugger
+
+There are several ways to call the debugger:
+
+=over 4
+
+=item perl -d program_name
+
+On the given program identified by C<program_name>.
+
+=item perl -d -e 0 
+
+Interactively supply an arbitrary C<expression> using C<-e>.
+
+=item perl -d:Ptkdb program_name
+
+Debug a given program via the C<Devel::Ptkdb> GUI.
+
+=item perl -dt threaded_program_name
+
+Debug a given program using threads (experimental).
+
+=back
+
 =head2 Debugger Commands
 
-The debugger understands the following commands:
+The interactive debugger understands the following commands:
 
 =over 12
 
@@ -348,8 +372,8 @@ Delete all installed actions.
 =item w expr
 X<debugger command, w>
 
-Add a global watch-expression.  We hope you know what one of these
-is, because they're supposed to be obvious.
+Add a global watch-expression. Whenever a watched global changes the
+debugger will stop and display the old and new values.
 
 =item W expr
 X<debugger command, W>
@@ -1032,18 +1056,22 @@ Note that any variables and functions that are not documented in
 this document (or in L<perldebguts>) are considered for internal
 use only, and as such are subject to change without notice.
 
-=head2 Readline Support
+=head2 Readline Support / History in the debugger
 
 As shipped, the only command-line history supplied is a simplistic one
 that checks for leading exclamation points.  However, if you install
-the Term::ReadKey and Term::ReadLine modules from CPAN, you will
+the Term::ReadKey and Term::ReadLine modules from CPAN (such as
+Term::ReadLine::Gnu, Term::ReadLine::Perl, ...) you will
 have full editing capabilities much like GNU I<readline>(3) provides.
 Look for these in the F<modules/by-module/Term> directory on CPAN.
 These do not support normal B<vi> command-line editing, however.
 
-A rudimentary command-line completion is also available.
-Unfortunately, the names of lexical variables are not available for
-completion.
+A rudimentary command-line completion is also available, including
+lexical variables in the current scope if the C<PadWalker> module
+is installed.
+
+Without Readline support you may see the symbols "^[[A", "^[[C", "^[[B",
+"^[[D"", "^H", ... when using the arrow keys and/or the backspace key.
 
 =head2 Editor Support for Debugging
 
@@ -1073,10 +1101,10 @@ your Perl as a C programmer might.
 =head2 The Perl Profiler
 X<profile> X<profiling> X<profiler>
 
-If you wish to supply an alternative debugger for Perl to run, just
+If you wish to supply an alternative debugger for Perl to run,
 invoke your script with a colon and a package argument given to the
-B<-d> flag.  The most popular alternative debuggers for Perl is the
-Perl profiler.  Devel::DProf is now included with the standard Perl
+B<-d> flag.  Perl's alternative debuggers include the Perl profiler,
+L<Devel::DProf>, which is included with the standard Perl
 distribution.  To profile your Perl program in the file F<mycode.pl>,
 just type:
 
@@ -1085,7 +1113,9 @@ just type:
 When the script terminates the profiler will dump the profile
 information to a file called F<tmon.out>.  A tool like B<dprofpp>,
 also supplied with the standard Perl distribution, can be used to
-interpret the information in that profile.
+interpret the information in that profile.  More powerful profilers,
+such as C<Devel::NYTProf> are available from the CPAN:  see L<perlperf>
+for details.
 
 =head1 Debugging regular expressions
 X<regular expression, debugging>