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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • davy zhang

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

    I mean every process attach like thread in wingide

    like thread or tasklet in wingide

    :)

    maybe I asked toooo much:D
  • Aaron Brady

    #2
    Re: Is there a way to step debug the multiprocessing python program?

    On Nov 7, 9:15 pm, "davy zhang" <davyzh...@gmai l.comwrote:
    I mean every process attach like thread in wingide
    >
    like thread or tasklet in wingide
    >
    :)
    >
    maybe I asked toooo much:D
    Here is where 'multiprocessin g' 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.

    Comment

    Working...