开发者

Printing the expression result in hexadecimal format using visual studio's trace points

开发者 https://www.devze.com 2023-04-12 04:00 出处:网络
Does anybody know, whether it\'s possible to output the val开发者_开发技巧ues in a hexadecimal via the visual studio\'s trace points?

Does anybody know, whether it's possible to output the val开发者_开发技巧ues in a hexadecimal via the visual studio's trace points?

Thanks!


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}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号