-
Notifications
You must be signed in to change notification settings - Fork 240
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
Feature request: Improved variables view #364
Comments
顶,强烈要能选hex |
You can do this in the Watch window. You do Variables window UI is controlled by VSCode but they recently added a feature to control the format but it is unclear how it works across data types and stack frames. Sorting Globals by name is possible |
Hi haneefdm Do you mean that sorting globals are already a possibility or it is possible to update cortex-debug to do it ? Thanks in advance |
HUGE +1 for this issue. Seems like VSCode supports debuggers implementing this formatting now. This is one of the last features required to make VSCode the best embedded IDE out there! |
@Marus - Is this something that you would consider looking into ? |
@KrestenHelstrup I have worked with weinand before. While he added that new feature, we have an issue as well. We do not interpret values. We just report them as GDB does. Things can get messy and prone to error. Esp. floating point. It should be possible. One thing that is not clear to me is how to remember which variable has which format between frames and every time you get a breakpoint |
@haneefdm Would it make sense to Weinand for some input ? Maybe he can point in the right direction. |
Please, please add hexadecimal display for variables in VS Code. Love the Marus extension and VS Code; adding this would make every embedded developer so much more productive (and happy). |
@Marus & @haneefdm - I have figured out that you can change all variables from hex to decimal and back by writing "set output-radix 16/10" in the debug console. Is it possible to implement an easy way to switch between these ? |
@sidking You can try creating gdb aliases (or even macros) in your ~/.gdbinit file https://www.zeuthen.desy.de/dv/documentation/unixguide/infohtml/gdb/Aliases.html See the end of that page, which may be more appropriate. I have not tried this out but you could do
You maybe thinking buttons or menu items but those take many more mouse/keyboard actions |
@haneefdm This didn't work for me. However this did:
And then used as:
Thanks for the tip! I would also like to add that this is a really sought after feature for many. Myself included. With this |
How can this be achieved? |
Sorting (just for Globals) not that hard. This got lost among other things |
Ah. I thought this would be a user setting or gdb command. So it sounds like it has to be implemented in the extension. |
It is done. It will be in the next release. We don't rely on gdb for globals/statics functions and variables. We get that directly from the elf file. This will add a tiny bit to startup time -- if you have thousands of globals. gdb is needed for locals/scoped variables though. |
A side effect or sorting globals is that all the variables starting with Oh well, lesser of the two evils |
One option would be (but I am asking here too much I suppose) after the list is sorted to find the the first non-underscore entry and then splice this part of the array off and insert it at the beginning, so all the underscore entries move to the end. |
@hwmaier Yes, good idea and 99% sure that people will complain that I don't know how to sort. I thought of putting them all into a (fake) scope under Globals but that is way too much work and likely to break something -- ripple effect. |
Okay, this is the best I could about displaying values. It works in Variables and Watch windows for simple values that look like hex or decimal values. There have been times when I could not get the tooltip to popup. Again, this UI element doesn't belong to us and VSCode does not make any promises. I am using the That whole thing about adding stuff to the context menus did not go anywhere. Sure I can launch something from there but I can't actually change what you see. The thread microsoft/vscode#28025 ended up being not very good and I have to use undocumented APIs and still can't do what we need. The gdbinit is still your best bet and maybe the tooltip can helps as well. And no, can't copy from tooltip |
You are right about that. cppvsdbg sorts locals in simple alphabetical order. Underscored vars appear first. Maybe don't trouble yourself about the underscores and just do a simple sort as the cppvsdbg debugger does. That would be a huge improvement making finding variables so much easier.
If you offer a hover with hex/bin/oct view, you are miles ahead of Microsoft's C++ debugger cppvsdbg which offers only a basic hover. This will be very useful. |
Changes in 0.4.2 release. See Changelog From the original
Yes, but it is all or nothing, ie not on a per variable basis. But registers and variables can be controlled independently.
Nope. Tons of work is required because these Windows do not belong to us. They are VSCode's. Perhaps you can file an issue with the core VSCode/Microsoft
Done. However, variables with double underscores are at the bottom Closing this issue as most of it is done. Feedback is welcome. |
Hi
I have three feature requests for the variables view.
Thanks in advance
The text was updated successfully, but these errors were encountered: