[IPython-User] debugging engine code

Fernando Perez fperez.net@gmail....
Tue Aug 24 13:13:53 CDT 2010


Hi Darren,

On Tue, Aug 24, 2010 at 6:28 AM, Darren Govoni <darren@ontrenet.com> wrote:
> Thanks for the pointers Brian.
>
> I'm using multiengine client. I'll give the %debug a try.
> But is it possible to set breakpoints (e.g. pdb.set_trace()) in engine
> code and have it break on the engine side and debug there?

If you let 'ipcluster' start your engines,  set_trace will likely NOT
work engine-side, because raw_input() won't work, since stdin for the
engine process isn't hooked to anything useful.  Remote debugging has
been a weakness of our current design.

With the new machinery over zmq, this already works for debugging on a
remote kernel.  However, the parallel computing code hasn't been
ported yet, we're just in the thick of the work right now.

But here's an idea: while debugging, start your engines *manually*
each in its own terminal.  This way, when you enable pdb in your
engine code, that terminal will become available and you should be
able to type directly in that terminal.

Let us know how it goes.

> I really like this package and am switching my application over to it.

Glad to hear that!

Regards

f


More information about the IPython-User mailing list