-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Explicitly add "justMyCode": "true" to all launch.json configurations
#18471
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
Explicitly add "justMyCode": "true" to all launch.json configurations
#18471
Conversation
|
Hi @posita, thank you for your PR! Remember to add a news file thanking yourself, so that your contribution appears in our release notes 🙂 Also, the changes you made caused unit tests to fail, please make sure to fix them. It should only be a matter of adding |
|
Thanks @kimadeline! This is a draft. I wanted to push this to:
#2 is no longer an issue, thanks to your follow-up. Thanks for your attention and diligence, though. I appreciate the nudges and advice! 😊 I will address the tests, push an update, and mark the PR as ready for review shortly. |
|
I think adding the |
kimadeline
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi there,
The skip package json label is added by maintainers of this repo. For the news file, please make it a one-liner, since we gather all news files and add them as bullet points to the changelog.
Something like the following should be enough:
Explicitly add "justMyCode": "true" to all launch.json configurations. (Thanks Matt Bogosian)
Done. Thanks, @kimadeline! |
kimadeline
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution!
Added a suggestion for you to thank yourself in the news entry (will appear in the changelog), I'll merge your PR once you've accepted the suggestion or let me know otherwise.
Co-authored-by: Kim-Adeline Miguel <51720070+kimadeline@users.noreply.github.com>
…ions (microsoft/vscode-python#18471) * Explicitly add `"justMyCode": "true"` to all `launch.json` configurations Fixes microsoft/vscode-python#18389. * Respond to maintainer feedback * Update news/2 Fixes/18471.md Co-authored-by: Kim-Adeline Miguel <51720070+kimadeline@users.noreply.github.com> Co-authored-by: Kim-Adeline Miguel <51720070+kimadeline@users.noreply.github.com>
Fixes #18389.
Problem and Constraints
Hiding aspects of running code from the debugger is the unfortunate default for
vscode-python. Users who come from other environments (IPDB, PyCharm, etc.) are presented with a disorienting absence of expected information that can lead to a distrust of the product.Generally, where hiding relevant detail is the default, the mechanism to expose that detail should be obvious and be accessible in close proximity to where such detail would otherwise appear. VSCode itself presents no opportunity to cure this defect directly, which makes the selected default even more confusing.
To date, the casual response has been to point users to the documentation. This is not helpful to newcomers who may not even be aware that such documentation exists or casual users who have not revisited the documentation in awhile. Remote documentation is a poor substitute for proper interface design.
Changing the default was considered and rejected, apparently because VSCode largely targets less sophisticated developers. This is accepted without challenge as the research leading to this conclusion is likely proprietary.
Solution
So what can we do?
One slightly removed but prominent surface controlling debugger behavior is
launch.json, which is both accessible and reasonably connected to the debugging workflow. Unfortunately,justMyCode(the non-intuitively named setting that hides some stack frames and breakpoints by default) does not appear in the default configuration.Without substantial reworking of the debugger environment itself, the best identified compromise available at the time of this writing is to add
"justMyCode": trueexplicitly to new configurations inlaunch.json. Because it is not obvious what this setting does by name alone, it should be accompanied by a comment that explains its function and links to its documentation (ideally, from within VSCode itself to avoid requiring a network connection).microsoft/vscode-python#18471 adds an explicit entry to default configurations. Perplexingly, there is no mechanism to add an accompanying comment or link to the documentation. That deficiency is identified in microsoft/vscode#142533, which must be handled in a subsequent PR.
Commentary
This serves as a cautionary tale to professional product designers and developers everywhere to select defaults carefully, with a diverse human audience in mind, and to provide ergonomic mechanisms to discover and manipulate those defaults.