-
Notifications
You must be signed in to change notification settings - Fork 26
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
Surface "variablePresentation" in settings.json #165
Comments
Todo:
|
On a second thought, I'm not sure we want to expose this directly like that. While setting it in launch.json does work, logically, the proper place for this is in extension settings (since this is usually a generic debugging UX preference, not specific to a particular debug target). So perhaps it would be better to expose it in settings, and have some code that injects the corresponding properties into the debug configuration? It can be put in the schema regardless, but if we do it, we'll have to keep it there for back-compat reasons even if we also do the setting later - and that will be more confusing than having it in one place. @luabud, what do you think? |
I'd suggest not adding into settings.json until we have users requesting the ability to change the defaults, else we end up with more settings in settings.json that are probably not going to be used by a majority of the users. |
We already have users asking for this - see the StackOverflow link in the bug description. |
I agree with you @int19h, it makes sense to have it as a User setting (I don't see how someone would like to disable this per project?). @DonJayamanne about this:
I feel that this is already the case for VS Code all up, isn't it? Perhaps I'm biased because I love the power of customization in VS Code, so I'd love to have this in the extension too. |
What would be the settings.json name for this? I'd expect something like "python.debugging.variablePresentation", but note that we don't have anything that starts with "python.debugging" at the moment. |
@int19h I like it! An alternative would be to have python.debuggerVariablePresentation, but I prefer your suggestion because it goes with our other settings (python.testing, python.linting, etc.). |
Hello, guys. I may wonder if we already have this in settings. I searched |
Hi everyone, We have some customers asking for this from the PTVS side as well, so we'll probably need to expose these options in a python-specific Tools -> Options page in VS. Following the stack overflow post (https://stackoverflow.com/questions/62346091/how-can-i-disable-hide-the-grouping-of-variables-in-vscode-python/62401205#62401205), I just want to make sure I'm aware of all the presentation option values.
Are these all the available variable types? |
I spoke with Pavel offline and he confirmed that these are all the available options. I'm going to mess with passing some hardcoded values to debugpy through Visual Studio to make sure it's working properly, then I'll work on the options page. @luabud perhaps we can release this feature for both VS and VSCode around the same time? 😄 |
The Visual Studio side of work is basically done for PTVS with microsoft/PTVS#6337, pending UI approval. If we get approval before 1/29 (Fri), then it will be in VS 16.9 Preview 4. |
Hi, |
Definitely yes, sorry for all my noise. I was referring to related work, which implements the same functionality in PTVS, which is in VS, not vscode. THIS issue is still open to be taken. |
Can I work on this issue? |
@arsentieva yes! 😊 |
@arsentieva Feel free to ping me if you have any technical questions about this. |
Hi @int19h I am trying to find out where this logic should live and the search attempts for |
The extension is not aware of "variablePresentation" currently; it works in launch.json because everything in there flows to the debug adapter, which handles it as described here. settings.json is parsed by VSCode itself, so the extension just needs the appropriate contribution points and handlers. For vscode-python, I believe you're supposed to be using this wrapper (@kimadeline, correct me if I'm wrong): To actually flow it from settings into the debug config, you'll need to change the various configuration resolvers such as this one: This one already has an example of the "envFile" setting being propagated into the configuration; "variablePresentation" should be similar (but also applies to attach and other configs, so it probably belongs to the base class for them all). |
Hello. I've been looking for an option to set a default for |
An option would be great! At the moment, if you have many launch configs you need to copy paste the config in each of them. |
Hi team, would be great to have a config specific for modules as well. There is a question about this in stackoverflow: How to hide loaded modules from variable inspection in VSCode something like: "variablePresentation": {
"function": "hide",
"special": "hide",
"class": "group",
"all": "group",
"protected": "hide",
"modules": "hide"
} |
This is necessary if you want to hide this extra information when debugging tests. Those do not use launch.json configuration. |
microsoft/ptvsd#1621 (comment)
This allows user to control how various variable groups are shown in debugger UI. We have implemented it for VS originally (to allow it to request old behavior); but it's more broadly useful, and people are already asking for it in VSCode context.
The text was updated successfully, but these errors were encountered: