[IPython-dev] ipython as a debugger command-line interface?

Rocky Bernstein rocky at gnu.org
Tue Mar 10 17:28:08 EDT 2009


On Tue, Mar 10, 2009 at 4:26 PM, Ville M. Vainio <vivainio at gmail.com> wrote:

> On Tue, Mar 10, 2009 at 9:23 PM, Rocky Bernstein <rocky at gnu.org> wrote:
>
> > Gdb uses the protocol called GDB/MI, but outside of gdb I don't think any
> > other debugger has adopted it. ActiveState uses DBGp, and not just for
> their
> > Python IDE and debugger but also I believe for Tcl, Ruby and Python. And
> I'm
> > given to believe that there are other Python debuggers that use DBGp as
> > well. So right now that's what I'm contemplating in pydbgr.
>
> So is pydbgr meant to sit on server side of DBGp, client side, or both?


Both. One could use the pydbgr client side as a "back-end" like
ddd<http://www.gnu.org/software/ddd/>or gnu emacs do for
pydb <http://bashdb.sourceforge.net/pydb/>.

But most of the emphasis is and will on the debugging support side, followed
by protocol support.



>
> DBGp does look like an exhaustive protocol; and admittedly more
> documented than rpdb2 protocol. Can you reuse an existing DBGp server
> module?


Shane Caraveo in private email wrote  (I hope this is okay to cite):


>
> While our UI code is proprietary and only part of Komodo IDE, several of
> our dbgp implementations are open source, and available from
> http://svn.openkomodo.com/openkomodo/browse/
>

It would be nice to have skeletal DBGp client/server implementations for
testing. As best as I can tell though this doesn't exist yet or I am not
aware of it.

But we've strayed from the original thought which was adding a set of
domain-specific (or debugger-specific) commands to ipython to use that as a
debugger command-line + ipython.

Here's an additional thought along that vein. The way pydbgr gets its
commands for the command-line command processor is to import all files in a
directory, introspect and look for classes that end in "Command" and
instantiate each of those. (Now that I write this, better might be to check
that they are instances of some Command superclass) .  Given this, it's
possible to add a feature where users can write their own customized
debugging commands and put them in a directory and when you start the
debugger point to the directory and have the debugger add those additional
debugger commands.

I throw this idea out as an alternative to ipython way to add "magic"
commands. I'm not that familiar with ipython magic commands, but probably
that's the way one would add debugger-specific commands in ipython.




>
>
> --
> Ville M. Vainio
> http://tinyurl.com/vainio
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20090310/312ab812/attachment.html>


More information about the IPython-dev mailing list