diff options
author | David Mitchell <davem@iabyn.com> | 2016-08-08 12:35:55 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2016-08-08 12:41:45 +0100 |
commit | f075db897912b679e8b0840562b0735b262f07df (patch) | |
tree | 8bbdfd7fc158612960ebe3a925319f66bffe0814 /pod/perlrun.pod | |
parent | a0138d8f956795ddbe09061f95b68766223904b7 (diff) | |
download | perl-f075db897912b679e8b0840562b0735b262f07df.tar.gz |
Document -DDEBUGGING better
RT #128671 and http://nntp.perl.org/group/perl.perl5.porters/238127.
In particular, perlhacktips and perlrun contained out-of-date information
that setting -g would automatically set DEBUGGING too.
I've also improved the description of -DDEBUGGING in INSTALL, and
tried to make it clearer when the text is referring to the Configure
switch -DDEBUGGING and when to the C compiler switch -DDEBUGGING.
Diffstat (limited to 'pod/perlrun.pod')
-rw-r--r-- | pod/perlrun.pod | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/pod/perlrun.pod b/pod/perlrun.pod index b7e1059441..12cba356f5 100644 --- a/pod/perlrun.pod +++ b/pod/perlrun.pod @@ -379,11 +379,14 @@ X<-D> X<DEBUGGING> X<-DDEBUGGING> =item B<-D>I<number> -sets debugging flags. To watch how it executes your program, use -B<-Dtls>. (This works only if debugging is compiled into your -Perl.) Another nice value is B<-Dx>, which lists your compiled -syntax tree. And B<-Dr> displays compiled regular expressions; -the format of the output is explained in L<perldebguts>. +sets debugging flags. This switch is enabled only if your perl binary has +been built with debugging enabled: normal production perls won't have +been. + +For example, to watch how perl executes your program, use B<-Dtls>. +Another nice value is B<-Dx>, which lists your compiled syntax tree, and +B<-Dr> displays compiled regular expressions; the format of the output is +explained in L<perldebguts>. As an alternative, specify a number instead of list of letters (e.g., B<-D14> is equivalent to B<-Dtls>): @@ -429,8 +432,7 @@ All these flags require B<-DDEBUGGING> when you compile the Perl executable (but see C<:opd> in L<Devel::Peek> or L<re/'debug' mode> which may change this). See the F<INSTALL> file in the Perl source distribution -for how to do this. This flag is automatically set if you include B<-g> -option when C<Configure> asks you about optimizer/debugger flags. +for how to do this. If you're just trying to get a print out of each line of Perl code as it executes, the way that C<sh -x> provides for shell scripts, |