views:

116

answers:

4

Is there a way to interface the Perl debugger API which perl is using to control its debugging programmatically?

+5  A: 

The default Perl debugger was not designed with a clean API to interact with, so the easiest way is probably not to use it, but to use Devel::ebug, which offers an API to an alternative debugger. You can also trigger the debugger from inside your code, calling an interactive debugger session, with Enbugger.

mirod
who does open perl ide does it ? its free ide in sf.net
IMHO, it is better to use Eclipse or Padre instead of Open Perl IDE.
Alexandr Ciornii
+5  A: 

It's all in the perldebug, perldebguts, and DB documentation.

In addition, I've written a Creating a Perl Debugger which should get you started. I have a section on custom Perl debuggers in Mastering Perl too.

brian d foy
+1  A: 

You can read about the perl debugger at perldoc perldebug and perldoc perldebtut. You can invoke the debugger with the -d option, i.e. perl -d myscript.pl.

Ether
A: 

See "Programming Perl" 20.5.1 -> "Writing your own debugger", also see perldoc perlvar $PERLDB.

What you want to do is to implement the DB::DB() sub.

xxxxxxx