-
Notifications
You must be signed in to change notification settings - Fork 67
multiprocessing not working while debugging (it works on terminal though) #1969
Comments
Can you tell more about the code that you're debugging? Is it explicitly starting multiple processes, or using some library that does? |
Hi int19h and thank you for your concern. in the relevant file, first multiprocessing is included: import multiprocessing then later in the code: proc = multiprocessing.Process( target=my_function, args=(my_addr, my_buffer, my_class, kwargs)) while debugging, "proc.start()" is where the program breaks when pressing f10 (step over). However, I noticed that if I press f11 (step into) the cursor goes past that instruction but the program stops responding after "self.conn= listener.accept()", leaving in my working directory a file named after the string inside "my_addr" Thanks again, |
Are you missing |
Hi int19h, |
There are several issues here. The fundamental problem is that ptvsd 4.x does not support forking (#943). We have fixed this via #1706, and it will ship in ptvsd 5, but this is in testing at the moment.
However, the behavior of Note that BTW, the docs don't mention the second argument to |
Thank you very much, int19h, for your detailed explanation. |
Please follow the instructions in #1706 (comment) to try the new debugger! |
Issue Type: Bug
here's the Error Traceback:
Traceback (most recent call last):
File "/home/paolo/.vscode/extensions/ms-python.python-2019.11.50794/pythonFiles/lib/python/old_ptvsd/ptvsd/log.py", line 110, in g
return f(*args, **kwargs)
File "/home/paolo/.vscode/extensions/ms-python.python-2019.11.50794/pythonFiles/lib/python/old_ptvsd/ptvsd/pydevd_hooks.py", line 74, in start_client
sock, start_session = daemon.start_client((host, port))
File "/home/paolo/.vscode/extensions/ms-python.python-2019.11.50794/pythonFiles/lib/python/old_ptvsd/ptvsd/daemon.py", line 214, in start_client
with self.started():
File "/home/paolo/anaconda3/envs/tensorflow-cpu/lib/python3.7/contextlib.py", line 112, in enter
return next(self.gen)
File "/home/paolo/.vscode/extensions/ms-python.python-2019.11.50794/pythonFiles/lib/python/old_ptvsd/ptvsd/daemon.py", line 110, in started
self.start()
File "/home/paolo/.vscode/extensions/ms-python.python-2019.11.50794/pythonFiles/lib/python/old_ptvsd/ptvsd/daemon.py", line 145, in start
raise RuntimeError('already started')
RuntimeError: already started
I've also tried the advised fix of adding "subProcess: true" in the debugging configuration, and "multiprocessing.set_start_method('spawn', True)": no improvements.
This was working earlier (a few weeks ago).
Extension version: 2019.11.50794
VS Code version: Code 1.40.2 (f359dd69833dd8800b54d458f6d37ab7c78df520, 2019-11-25T14:54:40.719Z)
OS version: Linux x64 4.15.0-72-generic
System Info
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: disabled_software
skia_renderer: disabled_off
surface_control: disabled_off
surface_synchronization: enabled_on
video_decode: unavailable_off
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off
webgl: enabled
webgl2: enabled
The text was updated successfully, but these errors were encountered: