Does anybody know, whether it's possible to output the values in a hexadecimal via the visual studio's trace points?
Thanks!
Tracepoint is an awesome feature of Visual Studio and it is available since Visual Studio 2005. It allows you to write the values in output window without even stopping at any point or you can stop it after the loop and see how the loop progressed based on your needs.
The trace command defines a tracepoint, which is a point in the target program where the debugger will briefly stop, collect some data, and then allow the program to continue.
Set tracepoints in source code You can set tracepoints by specifying an output string under the Action checkbox in the Breakpoint Settings window. To initialize a tracepoint, first click on the gutter to the left of the line number where you want to set the tracepoint.
The Autos and Locals windows show variable values while you are debugging. The windows are only available during a debugging session. The Autos window shows variables used around the current breakpoint.
I have recently found out, how this can be done. Visual studio provides a way to specify the format we want to see the expression in the watch/immediate windows. You can do the following:
foo, x
This will display the foo variable in the hexadecimal format regardless of whether the hex or dec displayed is globally enabled in VS. You can also specify lots of other display formats. The full list can be found there http://msdn.microsoft.com/en-us/library/75w45ekt.aspx.
This feature also works with trace points, which is very useful when you want the values to appear in hexadecimal format in output window.
{bar,x}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With