shmem has asked for the wisdom of the Perl Monks concerning the following question:
Is it possible to invoke the perl debugger at runtime? I'm currently working on Devel::Trace, writing a test suite for all the nifty changes.
But 'make test' runs - of course - perl without the -d switch. Stating use Devel::Trace @args doesn't initialize the debugger. My workaround is...
use strict; use Test::More tests => 1; my $result = join '', `perl -It -Iblib/lib -d:Trace t/foo.pl 2>&1`; my $expected = join '',<DATA>; is($result,$expected); __DATA__ * expected output here *
but that is inelegant as feck.
Does anybody of you monks know how to instantiate the debugger at or after compile time? Is it even possible?
Or, as another possibility, shoehorn the -d flag into the test suite?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Invoke the perl debugger at runtime
by hippo (Archbishop) on Oct 01, 2024 at 14:55 UTC | |
by shmem (Chancellor) on Oct 01, 2024 at 15:15 UTC | |
|
Re: Invoke the perl debugger at runtime
by LanX (Saint) on Oct 01, 2024 at 14:46 UTC | |
by shmem (Chancellor) on Oct 01, 2024 at 14:53 UTC | |
by ysth (Canon) on Oct 01, 2024 at 21:53 UTC | |
|
Re: Invoke the perl debugger at runtime
by etj (Priest) on Oct 02, 2024 at 11:25 UTC |