I use ipdb.set_trace()
whenever I need to set a break point in my code. Right now, I'm trying to use it in a process that I've created using multiprocessing
, while the code does stop, I can't type anything to continue debugging. Is there any way to get my stdin
directed properly?
Ideally, I would like to imagine a new console opening everytime a forked process is stopped for debugging, however I don't think this is possible.
According to How to attach debugger to a python subproccess?, http://winpdb.org supports multiprocessing
debugging.
If you'd prefer doing more work for more flexibility, there are some interesting ideas at https://gist.github.com/csabahenk/6497709 (too long to include here).