![]() |
|
Just another Perl shrine | |
PerlMonks |
Debugger line numbering anomalyby lzipin (Acolyte) |
on Dec 23, 2019 at 23:09 UTC ( #11110568=perlquestion: print w/replies, xml ) | Need Help?? |
lzipin has asked for the wisdom of the Perl Monks concerning the following question: O monks, I've found anomalous behavior with the Perl debugger, and I'd like a sanity check. Here's a simple script that demonstrates the issue — at least on my laptop with a recent Xubuntu, Perl 5.26.1 and perl5db.pl v 1.51 (my Win7 machine with Strawberry Perl 5.28.2 doesn't have this problem). The script does a global regex replace on its first arg (word).
Open this in the debugger, l(ist) the script, and the 'print;' line is tagged line 5, not 6. The debugger doesn't find the script's line 5 ... although the script runs fine (e.g., the single arg 'abacadbd' yields 'dbdcadbd'). The debugger applies the commands 'c 5' and 'b 5' to the 'print;' line. With one or more multiline replace statements in the middle of a sizable script, this gets aggravating. Further, it's a tough problem to Google — a possible bug in the debugger, etc. Any resonance from No-Mind?
Back to
Seekers of Perl Wisdom
|
|