-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow tests to run with "justMyCode": false without a launch configuration #21748
Comments
Thanks for the feature request! We are going to give the community 60 days from when this issue was created to provide 7 👍 upvotes on the opening comment to gauge general interest in this idea. If there's enough upvotes then we will consider this feature request in our future planning. If there's unfortunately not enough upvotes then we will close this issue. |
Thank you to everyone who upvoted this issue! Since the community showed interest in this feature request we will leave this issue open as something to consider implementing at some point in the future. We do encourage people to continue 👍 the first/opening comment as it helps us prioritize our work based on what the community seems to want the most. |
This just went out with the latest release of the debugger extension! https://code.visualstudio.com/updates/v1_83#_python-debugger-updates |
And how do I use that extension with unit tests? When I click “Debug Unit test”, my breakpoint isn’t hit. I suspect the Python extension uses its own debugger instead of the one provided by the “Python Debugger” extension. |
Please open an issue against the debugger extension; it should work fine. |
As requested in #19030 (comment), I’m creating a new feature request.
"justMyCode": false
is a VS Code for Python debugger setting that has to be placed in a launch configuration (see below). It allows people to set breakpoints and step into 3rd party code. I found it plain necessary to debug how any non-trivial code interacts with library code. @brettcannon mentioned in that thread that the default"justMyCode": true
is a deliberate choice based on user feedback. However that doesn’t work for library and plugin developers, who often have to step into other libraries’ code.Running tests using the test runner uses a built-in/implied launch configuration. In order to set that setting, you need to find the linked-to docs and create an entry in
.vscode/launch.json
. The docs for this are good but encountered quite far into a long document and hard to find using a web search. Instead, web searches tend to dredge up long-obsolete launch configurations.I therefore propose to either switch
"justMyCode"
tofalse
by default, as it supports more use cases, or to add apython.debug.justMyCode
setting that allows easier and more discoverable configuration of this setting than creating a magic run configuration.The text was updated successfully, but these errors were encountered: