NAME
TB2::DebugOnFail - Enter the debugger on failure
SYNOPSIS
use TB2::DebugOnFail;
use Test::Simple tests => 3;
ok(1);
ok(0); # if run with -d you will enter the debugger
ok(1);
DESCRIPTION
A demonstration of writing an EventWatcher using accept_result
to drop you into the debugger when an assert fails.
CAVEATS
You have to run the test in the debugger.
You'll wind up at the end of the DebugOnFail assert_end wrapper. You can hit 'r' a few times to get back to your test, or examine the $result object. It would be nice if it could start the debugger just after the assert was called instead.