Cannot debug Python modules via launch.vs.json #7676
vsfeedback
started this conversation in
Enchancements
Replies: 1 comment
-
Thanks for the issue. Moving this issue to discussion as an enhancement request for comments and upvotes. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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)
Beta Was this translation helpful? Give feedback.
All reactions