Skip to content

Commit

Permalink
Make sure that the debugger is cleared after fork in non-python proce…
Browse files Browse the repository at this point in the history
…ss. Fixes microsoft#1005
  • Loading branch information
fabioz committed Aug 12, 2022
1 parent 71d42ed commit 00834a5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_monkey.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import sys
from _pydev_bundle._pydev_saved_modules import threading
from _pydevd_bundle.pydevd_constants import get_global_debugger, IS_WINDOWS, IS_JYTHON, get_current_thread_id, \
sorted_dict_repr
sorted_dict_repr, set_global_debugger
from _pydev_bundle import pydev_log
from contextlib import contextmanager
from _pydevd_bundle import pydevd_constants
Expand Down Expand Up @@ -904,6 +904,8 @@ def new_fork():
if is_new_python_process:
PydevdCustomization.DEFAULT_PROTOCOL = protocol
_on_forked_process(setup_tracing=apply_arg_patch and not is_subprocess_fork)
else:
set_global_debugger(None)
else:
if is_new_python_process:
send_process_created_message()
Expand Down

0 comments on commit 00834a5

Please sign in to comment.