Vscode-cpptools: Debugger: show integer types in multiple ways: hex, dec, ascii, binary

Created on 2 Dec 2016  路  2Comments  路  Source: microsoft/vscode-cpptools

It looks like variables in the debugger are based on their type -- but when using uint8_t they show up as char, when what I really want to see is the decimal value.

It would be nice to show all alternate forms of a variable -- hex, dec, ascii, binary -- or have a way to switch between types in the UI.

The only (tedious) way to do this now is to use the debug console and typecast to (int) for example.

Most helpful comment

FWIW, this does not appear to work with memory addresses in hex (such as debugging on an MCU) - no permutation of h or x, a delimiter like , or /, and the address, would display any value.

All 2 comments

@jpap This is the same as #319 . You can specify common variables in the Watch window. You can find format specifiers and you can find the format specifiers here.

For example for double dbl I added dbl,h to the Watch window and it displayed the value of dbl in hex.

FWIW, this does not appear to work with memory addresses in hex (such as debugging on an MCU) - no permutation of h or x, a delimiter like , or /, and the address, would display any value.

Was this page helpful?
0 / 5 - 0 ratings