-
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
Missing Variable Value Tooltips #121
Missing Variable Value Tooltips #121
Comments
Well, having a further look at it I can now say that for some variables I do get hover values. Tinkering around in the gdb console I found a major difference between a variable where I get a hover value and a variable where I don't get it. In my program code there is a variable named
One of the variables not showing a hover tooltip is
Maybe this difference (static vs. local) is relevant for your debug adapter? In fact, another debug adapter is giving me the tooltip also for the
|
Just collected some additional information: When using MS's C/C++ extension (ms-vscode.cpptools) I am getting these tooltips for both types of variables, local and static. The MS extension seems to retrieve values from gdb on demand (i.e. when hovering over a variable). This is the log output from the extension when hovering over a local variable:
And here's the output for hovering over a static variable:
|
There is a slight concern of turning this on for GDB as it is documented with this [requirement](https://microsoft.github.io/debug-adapter-protocol/specification#Types_Capabilities): > The debug adapter supports a (side effect free) `evaluate` > request for data hovers. Because of side-effects on read that is present in memory mapped registers in embedded systems this can cause unexpected reads of the target's registers. For Eclipse CDT I don't think there is any special code, so I think it is ok to do this here too. GDB also has a number of settings that may be useful to prevent accidental reads too. Fixes eclipse-cdt-cloud/cdt-gdb-vscode#121
I don't know why it wasn't enabled when the adapter was first written, but
Because of side-effects on read that is present in memory mapped registers in embedded systems this can cause unexpected reads of the target's registers. For Eclipse CDT I don't think there is any special code, so I think it is ok to do this here too. GDB also has a number of settings that may be useful to prevent accidental reads too. Fix in progress in eclipse-cdt-cloud/cdt-gdb-adapter#347 |
Thanks @chroberino for taking the time to report this issue. When I next publish the adapter this change will appear. The version will probably be v1.0.5 |
Thank you so much, @jonahgraham! => I would appreciate some hints on how to do this. Just in case I ever feel like analysing such issues again... ;) |
@chroberino I took this opportunity to update the README, see #129 and the updated https://github.com/eclipse-cdt-cloud/cdt-gdb-vscode?tab=readme-ov-file#co-developing-cdt-gdb-adapter Please let me know if anything isn't clear there and I'll try to answer questions and update it. |
@jonahgraham, does the latest 2.0.0 release contain this change in |
Doh! Not it doesn't, the adapter is now published to npm with the fix and I have started the (new) process of getting that into the extension here: #139 |
I am using the cdt-gdb-vscode extension (v0.0.108) with Eclipse Theia for remote debugging with gdb, and overall, the setup works well. However, a key feature appears to be missing: variable value tooltips. When I hover over a variable name in the editor window, I do not see a tooltip displaying the variable's current value.
This feature is available in another debug adapter I was using, and it would be very helpful for my workflow to have the same functionality here.
The text was updated successfully, but these errors were encountered: