iarsystems / iar-vsc-debug

Visual Studio Code extension for the IAR C-SPY debugger
19 stars 1 forks source link

Feature: Display variables in different formats #13

Open sbixl opened 2 years ago

sbixl commented 2 years ago

It would be very nice, if the contents of a variable in the variables view can be displayed in different formats (hex dec, bin,...). The Cortex-Debug [1] plugin has a nice feature to solve this by showing a tooltip while hovering of the accordant variable:

129586732-71228fee-6d6c-4993-ac8f-c9ca93b7772f

[1] https://marketplace.visualstudio.com/items?itemName=marus25.cortex-debug

HampusAdolfsson commented 2 years ago

This is something we definitely want to support and are looking into. One option would be to add a right click option to each variable that lets you set its display format, or we could add some global setting that changes the display format for all variables.

Due to how our debugger API is shaped, we can't show all formats at the same time like Cortex-Debug without affecting performance too much.

davidanderle commented 1 year ago

I think GDB-based debuggers use Output formats to do this. Essentially, you could add your variable as myVar, h in the watch window to display it as a hexadecimal value. Is this something that would be easier to implement?

HampusAdolfsson commented 1 year ago

That would work, but a right-click option on the variables would probably be more intuitive and not much more work to implement.