Я пока не нашел рабочего способа сделать это. Я попытался создать свой собственный файл launch.json внутри каталога .vscode со следующим содержимым:
Код: Выделить всё
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Debug Module",
"type": "debugpy",
"request": "launch",
"module": "project_folder.folder1.main",
"cwd": "${workspaceFolder}/..",
"console": "integratedTerminal"
}
]
}
Код: Выделить всё
E+00000.060: Error determining module path for sys.argv
Traceback (most recent call last):
File "c:\Users\User\.vscode\extensions\ms-python.debugpy-2025.18.0-win32-x64\bundled\libs\debugpy\launcher/../..\debugpy/..\debugpy\server\cli.py", line 370, in run_module
spec = None if options.target is None else find_spec(options.target)
~~~~~~~~~^^^^^^^^^^^^^^^^
File "C:\Users\User\AppData\Local\Programs\Python\Python313\Lib\importlib\util.py", line 91, in find_spec
parent = __import__(parent_name, fromlist=['__path__'])
ModuleNotFoundError: No module named 'project_folder.main'
Stack where logged:
File "C:\Users\User\AppData\Local\Programs\Python\Python313\Lib\runpy.py", line 198, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\User\AppData\Local\Programs\Python\Python313\Lib\runpy.py", line 88, in _run_code
exec(code, run_globals)
File "c:\Users\User\.vscode\extensions\ms-python.debugpy-2025.18.0-win32-x64\bundled\libs\debugpy\launcher/../..\debugpy\__main__.py", line 71, in
cli.main()
File "c:\Users\User\.vscode\extensions\ms-python.debugpy-2025.18.0-win32-x64\bundled\libs\debugpy\launcher/../..\debugpy/..\debugpy\server\cli.py", line 508, in main
run()
File "c:\Users\User\.vscode\extensions\ms-python.debugpy-2025.18.0-win32-x64\bundled\libs\debugpy\launcher/../..\debugpy/..\debugpy\server\cli.py", line 374, in run_module
log.swallow_exception("Error determining module path for sys.argv")
File "c:\Users\User\.vscode\extensions\ms-python.debugpy-2025.18.0-win32-x64\bundled\libs\debugpy\launcher/../..\debugpy/..\debugpy\common\log.py", line 215, in swallow_exception
_exception(format_string, *args, **kwargs)
c:\Users\User\Documents\project_folder\.venv\Scripts\python.exe: Error while finding module specification for 'project_folder.folder1.main' (ModuleNotFoundError: No module named 'project_folder.folder1')