I have a bunch of data driven tests. Because most of the actual
testing takes place in a small loop it's not convenient to set a
breakpoint on a particular line when I want to debug a specific test.
At the moment I'm doing something like this:
use Test::Builder;
if (Test::Builder->new->current_test >= 853) {
$DB::single = 1;
}
That works fine but it'd be more convenient to be able to do something
like this:
use Test::More tests => 1293
use Test::BreakAt tests => [853, 927..930];
I'd then get a breakpoint at the end of the immediately preceding test
so I could step through all the code leading to the problematic case.
I can monkeypatch Test::Builder so that it does something when it
passes those test numbers but is there any way I can instruct the
debugger to stop when it returns to the caller rather than as soon as
$DB::single == 1? I don't want the breakpoint to leave me in the guts
of Test::Builder.
Hmm. I hoped that talking to the bear would make the solution apparent
- but it seems I actually have to hit send this time :)
-
Andy Armstrong, Hexten