develooper Front page | perl.perl5.porters | Postings from July 2016

[perl #128670] Out-of-date info on DEBUGGING in perlhacktips,perlrun

Thread Next
James E Keenan via RT
July 27, 2016 23:53
[perl #128670] Out-of-date info on DEBUGGING in perlhacktips,perlrun
Message ID:
On Tue Jul 19 07:09:28 2016, wrote:
> This is a bug report for perl from,
> generated with the help of perlbug 1.40 running under perl 5.24.0.
> -----------------------------------------------------------------
> [Please describe your issue here]
> Both perlhacktips.pod and perlrun.pod contain some out of date info on
> enabling the compiler -DDEBUGGING option during configuration: Both
> documents
> indicate that running ./Configure with -Doptimize=-g will also enable
> the
> compiler -DDEBUGGING option, but this has evidently not been the case
> for
> many years.
> Clarification regarding the relationship between the ./Configure
> -DDEBUGGING option and the compiler -DDEBUGGING option would also be
> helpful for the newbie perl hacker.
> More in this thread:

Are these the sections of the documentation which you find misleading?


=head2 Poking at Perl

To really poke around with Perl, you'll probably want to build Perl for
debugging, like this:

    ./Configure -d -D optimize=-g

C<-g> is a flag to the C compiler to have it produce debugging
information which will allow us to step through a running program, and
to see in which C function we are at (without the debugging information
we might see only the numerical addresses of the functions, which is
not very helpful).

F<Configure> will also turn on the C<DEBUGGING> compilation symbol
which enables all the internal debugging code in Perl.  There are a
whole bunch of things you can debug with this: L<perlrun> lists them
all, and the best way to find out about them is to play about with
them.  The most useful options are probably


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.

Thank you very much.

James E Keenan (

via perlbug:  queue: perl5 status: new

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About