develooper Front page | perl.perl5.porters | Postings from March 2007

debugging engine features

Thread Next
From:
Ed S. Peschko
Date:
March 15, 2007 19:05
Subject:
debugging engine features
Message ID:
20070316010718.GD22743@venus
All,

I see that the regex engine has gotten a good rewrite for 5.10 (good to see), any
work being done on the default debugger?

I've got some rather kludgy code to do the following:

    bc /pattern_in_code/

which dynamically breaks the next time the code that is being executed sees 
the given pattern in the code that is running, and:

    bd /pattern_in_data/

which dynamically breaks when ANY lexical, global, or our variable contains
the given pattern in its value. So, eg


1	for ($xx = 0; $xx < 10; $xx++)
2	{
3		$xx++;
4		print STDERR "HERE - $xx\n"
5		$hash->{$xx}++;
6	}

	bc /HERE/

would break at line 4 and

	bd /6/

would break at 3 and 5 (when $xx became 6, and when $hash->{$xx} became 6 and when
$hash->{6} was assigned. )

Its got some limitations (references for example don't track), and is slow, but is 
very useful.  And I'd like to see something like it integrated into the standard 
debugger (right now its standalone), but am hesitant to dump any more kludges on 
top of it.

Ed

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About