2026-02-25 5:43 AM
There does not seem to be any way of viewing a debug variable in hex.
The closest workaround is to prefix (void*) before the expression in the watch window.
This is no good for viewing an array of hex digits like for example a CAN bus message.
Solved! Go to Solution.
2026-02-25 1:15 PM
Hi @Michael_John
You can add the following attribute to your debug configuration:
"preRunCommands": [
"set output 16"
],
Best Regards,
/Flo
2026-02-25 1:15 PM
Hi @Michael_John
You can add the following attribute to your debug configuration:
"preRunCommands": [
"set output 16"
],
Best Regards,
/Flo
2026-02-26 8:22 AM
Hi Forent
Thank you, that works nicely.
I see you have already marked your own answer as accepted.
Thank you for your response
2026-04-19 9:21 AM
Worked! Thanks!!
2026-05-11 10:48 PM
I was using watch variable via STM32 Run and Debug and found I could not use ,h or ,x or maybe ,b to display number in hex or binary. If we to adopt Visual Code (away from STM32 CubeIDE), why it is not supported for very fundamental debug tools?. Is there plan to fix this for upgrade STM32 package in extension?
2026-05-11 11:06 PM
Current trick shared by @Florent V already.
Shared already as part of roadmap: any update here ?
Not supported today because variables view is VS Code native i guess.