Is there a way to step debug the multiprocessing python program?

D

davy zhang

I mean every process attach like thread in wingide

like thread or tasklet in wingide

:)

maybe I asked toooo much:D
 
A

Aaron Brady

I mean every process attach like thread in wingide

like thread or tasklet in wingide

:)

maybe I asked toooo much:D

Here is where 'multiprocessing' assembles the command line to spawn
the subprocess (Windows version):

if getattr(sys, 'frozen', False):
return [sys.executable, '--multiprocessing-fork']
else:
prog = 'from multiprocessing.forking import main; main()'
return [_python_exe, '-c', prog, '--multiprocessing-fork']

It's in multiprocessing/forking.py. As you see, 'main()' is run in
the separate process first thing, which calls self._bootstrap().
Perhaps you can muck around with that and hook it into your IDE
somehow. Even using pdb, which is just a module in Python itself, was
a bit tricky. Let is know what you learn.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top