Re: Debugger: stopping in caller

2008-02-27 Thread Andy Armstrong
On 28 Feb 2008, at 02:54, Andy Armstrong wrote: sub watchfunction { if ( @DB::testbreak ) { require Test::Builder; my $current = Test::Builder->new->current_test; if ( $current + 1 >= $DB::testbreak[0] ) { shift @DB::testbreak

Re: Debugger: stopping in caller

2008-02-27 Thread Andy Armstrong
On 27 Feb 2008, at 13:47, Andy Armstrong wrote: use Test::More tests => 1293 use Test::BreakAt tests => [853, 927..930]; That was a bad interface anyway... After a bit of fiddling I now have this in my ~/.perldb: @DB::testbreak = (); # Monkeypatch cmd_b (set breakpoint) my $cmd_b

Re: author tests with Module::Install::AuthorTests

2008-02-27 Thread Ricardo SIGNES
* Eric Wilhelm <[EMAIL PROTECTED]> [2008-02-25T12:53:03] > # from Ricardo SIGNES > # on Monday 25 February 2008 04:59: > > >Basically, it lets you say "author_tests('xt')" in your Makefile.PL > > (using Module::Install) to have a directory (or directory tree) of > > tests run only by the module's

Re: Debugger: stopping in caller

2008-02-27 Thread Andy Armstrong
On 27 Feb 2008, at 17:14, Andy Armstrong wrote: Looks to be that the best place is at the two lines (yes, the code there is duplicated, or almost so - bleah) with the comment "Pop the single-step value off the stack." This is after the code has returned control to the debugger, so at that po

Re: Debugger: stopping in caller

2008-02-27 Thread Andy Armstrong
On 27 Feb 2008, at 17:10, Joe McMahon wrote: On Feb 27, 2008, at 5:47 AM, Andy Armstrong wrote: 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 so

Re: Debugger: stopping in caller

2008-02-27 Thread Andy Armstrong
On 27 Feb 2008, at 13:47, Andy Armstrong wrote: Hmm. I hoped that talking to the bear would make the solution apparent - but it seems I actually have to hit send this time :) This kind of thing works well (and is already proving useful) for breaking on exit from a scope: #!/usr/bin/perl

Debugger: stopping in caller

2008-02-27 Thread Andy Armstrong
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->n