Can I control the number of digits displayed in debugger windows for float and double variables?

后端 未结 6 1959
别跟我提以往
别跟我提以往 2021-01-08 00:51

In Visual Studio 2012, I\'m looking for a way to customize the default display of floating point types in the Autos, Locals, and Watch windows. I\'m familiar with the Native

6条回答
  •  死守一世寂寞
    2021-01-08 01:47

    Primitive types cannot currently be NatVizzed. However, if the specific primitives you're wanting to look at are members of another type that you can watch, you can apply formatting to that type, e.g.

    
    
      {(int)myDouble}.{(int)(myDouble*1000) % 1000}
    
    

提交回复
热议问题