8

I've seen a couple of questions on the topic but I didn't get a full answer...

My code is basically:

from multiprocessing import Process

p = Process(target=f).start()
p.join()

def f():
  print 'break!'

And I want to put a breakpoint on the print. I'm using pydev+eclipse (on Ubuntu).

Guy
  • 14,178
  • 27
  • 67
  • 88

1 Answers1

10

Because the new process itself is not controlled by PyDev, you need to make PyDev debugger manually aware of through Remote Debugging facilities.

http://pydev.org/manual_adv_remote_debugger.html

Use pydevd.set_trace() - notice that your breakpoints won't work (not sure if this has changed recent PyDev versions), but you need to manually enter set_trace() command to your code.

Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435
  • 1
    it's `settrace()` and not `set_trace()` and I had to set the port manually (i.e., `pydevd.settrace(port=xx)`). Other than that, it works great, thanks! – Guy Jul 21 '11 at 09:51