cancel
Showing results for 
Search instead for 
Did you mean: 

how to view debug variables in hex (VSCode with STM32CubeIDE extension)

Michael_John
Associate

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Florent V
ST Employee

Hi @Michael_John

You can add the following attribute to your debug configuration:

"preRunCommands": [
    "set output 16"
],

 

Best Regards,
/Flo

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

3 REPLIES 3
Florent V
ST Employee

Hi @Michael_John

You can add the following attribute to your debug configuration:

"preRunCommands": [
    "set output 16"
],

 

Best Regards,
/Flo

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Michael_John
Associate

Hi Forent
Thank you, that works nicely.
I see you have already marked your own answer as accepted.
Thank you for your response

shindepn
Associate

Worked! Thanks!!