-
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
Add variables to "VARIABLES" panel automatically. #168
Comments
I was hoping this could be worked around by adding a hack to the Watch list, eg |
I think it might be possible to add them automatically to the watch list, if not the variables panel, with something along the lines of: await vscode.commands.executeCommand<vscode.Location[]>('workbench.debug.viewlet.action.addWatchExpression', `${variables[0].name}`); I tried to code this into the extension but unfortunately can't test it as my extension development host starts then exits the extension immediately in development mode :( |
+1 for this. Would be great to get it fixed. |
+1 from me too, but this is so awesome to begin with, I'm happy enough. I can see where this is hard because how do you distinguish existing environment variables from ones set by the script? |
This would be the number one reason for using this extension and the first thing I looked for after installing it. Is there no work around for this, the functionality simply does not exist? |
add watches for the ones you want to look at. |
Thanks for replying. I would like to try this but I don't know how to do this. Do any of the videos here show how to add watchers: https://github.com/rogalmic/vscode-bash-debug and where to see their status? |
In this video: https://raw.githubusercontent.com/rogalmic/vscode-bash-debug/gif/images/bash-debug-samp-watch-advanced.gif he adds a watcher: |
not sure what you mean by "watcher" but you see the panel he's putting that ${PWD - 4} in, that's the 'watch window' or watch panel. all it means is that it the debugger will evaluate the expression in the watch window when the debugger stops to let you step through the next line. It's just like the local variables window except instead of trying to evaluate all local variables it only evaluates what you've specifically listed as wanting to watch. So anyway, all the watch window is doing is evaluating ${PWD - 4} every time you step through a line in the debugger. |
This is a duplicate of #98. It's an unknown issue and hasn't been fixed unfortunately. |
@senhui2intel : This is an issue tracker. Please retitle this ticket as an issue report. For example:
Also, please clarify your description adding text to make it obvious that the second screenshot is a screenshot of a different script. For example, you could add a "Screenshot of the Python debugger on an equivalent script" caption to the image. Or, you could modify the screenshot highlighting the word "Python". |
That depends on how the list is sorted, and on whether it can be filtered. |
Can someone with the necessary privileges please:
|
There are only two variables in the "VARIABLES" Panel for now:
$PWD
and$?
. The variableHELLO
declared by last line is not added to "VARIABLES" Panel automatically. I have to add it to watch manually.When I debug other language such python, variables are usually add to "VARIABLES" panel automatically. If this feature could be implemented, the user experience will be greatly improved.
Thanks!
The text was updated successfully, but these errors were encountered: