This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Cannot debug Python modules via launch.vs.json #7675
Labels
You can continue the conversation there. Go to discussion →
This issue has been moved from a ticket on Developer Community.
Visual Studio provides a way to debug Python programs, but fails to launch modules properly, so relative imports are failing. Consider this script (see attached project for a full example):
This module can be debugged via VS Code using this
launch.json
:However, Visual Studio provides no way to specify module debugging in
launch.vs.json
, sofrom ..util.abc import ABC
always fails to import another module from the same package because the import uses a relative path, which requires app to have a top-level Python module.Using
"interpreterArguments": "-m mymod.app.app"
just runs the module and fails to attach a debugger toapp.py
because alldebugpy
arguments are added after-m
, so they are ignored.module-test.zip
Original Comments
Feedback Bot on 6/29/2023, 06:19 PM:
(private comment, text removed)
Original Solutions
(no solutions)
The text was updated successfully, but these errors were encountered: