-
Notifications
You must be signed in to change notification settings - Fork 137
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
No way to disable "justMyCode" when debugging through extension #938
Comments
@johschmitz This should probably be filed as a feature request on the blander extension. They are passing a configuration directly without setting |
@karthiknadig So you are saying you just break lots of working extensions from the market place by introducing this new behavior and just making it the new default? And now all extension authors need to become active instantly? Kind of uncool... Edit: Thanks for the hint though. Will submit a pull request to get it fixed. |
The behavior is not new - this feature has been around for a very long time now. The only thing we've changed about it is renaming it from "debugStdLib" to "justMyCode" over two years ago, and even then debugpy still supports the legacy name for compatibility reasons. The default value also hasn't changed since the name was changed. So, I would rather look at the Blender extension for any recent changes that might affect this. I must also add that new config properties are going to appear from time to time along with new features, and those new features will sometimes change observable behavior in various ways (e.g. the way variables are formatted has changed over time). The expected behavior from anything that wraps debugpy is to provide the end user the ability to change the debug configuration, or at least those parts of it that can be changed without breaking the scenario. My recommendation for the Blender extension would be to register a custom debugger for |
To add to what @int19h said. We haven't changed the default for Extensions registering their own configuration provider can greatly improve the user experience in this case. Especially, if you want to use some of the advanced features. Or, if you even just wat to enable logging or set some environment variable. The way blender extension is doing it right now limits the capabilities of the debugger. |
I just don't understand why it then worked for me until recently. There must have been some kind of change. Otherwise I would have researched this earlier like it did now. Are you guys really sure about that? I have no idea when this option was introduced but I am pretty sure I did debug into external code this year without knowing about it. Anyway I guess it can be fixed based on the information you provided. So thanks a lot for the prompt support. |
Perhaps the location of the code itself changed? The heuristics behind "justMyCode" basically try to determine whether a given file is under your prefix path. If Blender used to do something weird with its stdlib, but now packages it as a regular Python install ( |
I don't know, I also used to debug into C++ code at work without setting this, that just can't be two years ago. |
VSCode has a notion of global debug configurations - it's basically a global launch.json that lives inside settings.json: "launch": {
"configurations": [
{ type: "python", ... }
]
} However, this isn't quite it, because it's still a separate configuration - if you use another one, that other one fully overrides everything. It sounds like what's needed here is some facility in VSCode that enables stacking debug configs in a layered way instead - that is, a global config like above, but one that is automatically used as a basis for any other configuration of the same type/request. Then you could set such things globally, but also override them on a per-config basis, in a consistent way. |
How about instead of using the layers, letting the user manipulate certain settings via the GUI or via some commands while the debugger is already running? Like a little toggle switch to turn justMyCode (and other things) on and off on the fly. |
Please upvote this: microsoft/vscode-python-debugger#116 |
Environment data
Actual behavior
There seems to be currently no way to disable the "justMyCode" debug option when debugging through an extension.
I am using the Blender Development extension (https://marketplace.visualstudio.com/items?itemName=JacquesLucke.blender-development) and this just breaks debugging into Python libraries that my Blender add-on code uses.
Expected behavior
Either justMyCode should be ignored for such use-cases or it should be possible to disable it in a kind of global way when using the debuger with "No Configurations".
Steps to reproduce:
The text was updated successfully, but these errors were encountered: