[IPython-User] debugging engine code
Wed Aug 25 10:26:16 CDT 2010
Setting pdb.set_trace() in my manual started engine doesn't seem to
work. I suspect it needs stdout to the terminal, which isn't the case?
For that matter, is there any way to tell the engine to log everything
to stdout? I use 'supervisor' for running/restarting processes and it
will roll logs from stdout autmatically.
Also, the only exception I ever get in the shell is:
CompositeError: one or more exceptions from call to method: execute
[0:execute]: AttributeError: 'module' object has no attribute 'exc'
Which doesn't tell me much. But what you mentioned about the latest
architecture you guys are working on sounds really great.
On Tue, 2010-08-24 at 11:13 -0700, Fernando Perez wrote:
> Hi Darren,
> On Tue, Aug 24, 2010 at 6:28 AM, Darren Govoni <email@example.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!
More information about the IPython-User