From e95cc2eeeca730d282fb7e209407fb0c0623ea42 Mon Sep 17 00:00:00 2001 From: Pavel Minaev Date: Mon, 12 Dec 2022 14:47:34 -0800 Subject: [PATCH] Fix #1148: ModuleNotFoundError: No module named 'debugpy' Fix #1149: UserWarning: incompatible copy of pydevd already imported Fix formatting for sys.path entry passed to subprocesses. --- src/debugpy/_vendored/force_pydevd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/debugpy/_vendored/force_pydevd.py b/src/debugpy/_vendored/force_pydevd.py index b89a69a0f..b4b2f904f 100644 --- a/src/debugpy/_vendored/force_pydevd.py +++ b/src/debugpy/_vendored/force_pydevd.py @@ -67,7 +67,7 @@ def debugpy_breakpointhook(): # This is important when pydevd attaches automatically to a subprocess. In this case, we have to # make sure that debugpy is properly put back in the game for users to be able to use it. -pydevd_defaults.PydevdCustomization.PREIMPORT = '%r;%s' % ( +pydevd_defaults.PydevdCustomization.PREIMPORT = '%s;%s' % ( os.path.dirname(os.path.dirname(debugpy.__file__)), 'debugpy._vendored.force_pydevd' )