We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3823aba commit a78e5c2Copy full SHA for a78e5c2
src/debugpy/adapter/__main__.py
@@ -211,7 +211,13 @@ def _parse_argv(argv):
211
# future imports of it or its submodules will resolve accordingly.
212
if "debugpy" not in sys.modules:
213
# Do not use dirname() to walk up - this can be a relative path, e.g. ".".
214
- sys.path[0] = sys.path[0] + "/../../"
+ if os.name == "nt":
215
+ import pathlib
216
+
217
+ windows_path = pathlib.Path(sys.path[0])
218
+ sys.path[0] = str(windows_path.parent.parent)
219
+ else:
220
+ sys.path[0] = sys.path[0] + "/../../"
221
__import__("debugpy")
222
del sys.path[0]
223
0 commit comments