-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't debug python with multiprocessing #9254
Comments
@CitizenSanity see instructions here. microsoft/ptvsd#943 essentially, you may need to set the def myFunc(funky_var):
print("This is SPARTA!!!\n\t" + str(funky_var))
if __name__ == "__main__":
import multiprocessing
multiprocessing.set_start_method('spawn', True)
from multiprocessing.pool import Pool
myPool = Pool()
lst = range(0,2)
myPool.map(myFunc,lst)
myPool.close()
myPool.join() |
when debugging pytorch code, the extension will encounter the same issue |
@zhangzp9970 @CitizenSanity Try these instructions to enable the new debugger: microsoft/ptvsd#1706 (comment) |
A similar issue occurs when main process spawns subprocess.Popen an than Popen spawns multiprocessing.Process. In real life, this code exists in Lunch configuration for the debugger is
Code example with
Another synthetic example also occurs only with
|
@ldurka We have addressed this in the latest insiders. The issue was that on remote development scenario we did not pickup the setting to enable the new debugger that supports multiprocessing. Please try it out. You will need to update the version of the extension installed in the remote environment. See instructions here: microsoft/debugpy#59 |
Closing this issue since we have addressed this. For anyone running into this issue please follow instructions here: microsoft/debugpy#59 |
@CitizenSanity commented on Fri Dec 20 2019
Using a simple python multiprocessing script like:
I expect my script to run~ but instead get a massive error chain:
Env: Python3 dev container
The text was updated successfully, but these errors were encountered: