Wrong values shown in Visual Studio debugger

I’m assigning a value to a locally created Vector3’s x, y, and z components.
My problem is that the debugger reports wrong values for the vector, even directly after the assignment.

Added a watch to the expressions creating the values, they are correct both before and after using them.
The debugger is definitely wrong since the code using the vector works fine.
If I set the components to a constant instead of the expression they report the correct values.
Not tied to Vector3’s, that was just the most recent example. This is inside a FixedUpdate, no other threads interfering.

Tried:

  • removing the bin folders, cleaning/rebuilding
  • disabling JIT optimization
  • switching between VS2017 and 2015
  • switching between Unity 2017.3 and 2018.1 beta
  • creating a new project from scratch and adding some scripts again

I hope I’m just missing something trivial, anyone has a guess what could be the problem?

Closest issue I found is this:

It is closed as “By design”, any way to know what the reasoning behind that is?

Minimal code to demonstrate the problem.
A new Unity3d project in 2018.1, with a single line in a component of the main camera’s update:

Have you tried re-installing the VSTU plugin? Or use the nuclear option of re-installing both Unity and VS2017. That’s about all I can think of; something must’ve gotten corrupted somewhere.

I use the debugger a lot and it works fine for me, so I’m not sure what else to say.

I did full reinstalls and tried different versions of both Unity(2017.3 and beta 2018.1) and Visual Studio(2015 and 2017), neither worked.
The debugger does work fine on a fresh win 10 on another computer so something deeper is borked on my current one or I just ran into a rare issue with win 8.1.
Spent way too much time on this problem already so will just nuke the OS on the machine I use for Unity and stop worrying about the cause.

It sounds like the .NET framework somehow got corrupted on your Win8.1 machine. But yes… I agree, a fresh OS re-install would likely be faster than trying to figure out the underlying cause (which may be uninstalling all .NET frameworks, re-install, and hope that fixes the problem…)

Unity’s Vector3.ToString method rounds the vector components, which makes the debugger appear to display wrong values, if you refer to that behavior? The vector components should be displayed correctly if you expand the vector in the Watch window.

Going by the last screenshot, 5.24f is somehow being rounded up into 22, so there’s something fishy about that.