Visual Studio 2015 Debugging: Can't expand local variables?

后端 未结 10 576
离开以前
离开以前 2020-11-29 05:43

I\'m using Visual Studio 2015 preview, and I\'m trying to debug my project. I was using VS 2012 previously, and depended largely on being able to hover over and expand local

相关标签:
10条回答
  • 2020-11-29 06:31

    I had a similar issue where when I hovered over my local variable, some would let me dive deeper and some would not show anything. After some digging I found an article on msdn here, that suggested resetting the settings in VS. Once I did that, I got a notice that I was running in Release mode and that some debugging features may not be available. Once I changed to Debug mode, everything worked like normal.

    Hopefully this will work for you as well.

    0 讨论(0)
  • 2020-11-29 06:31

    I've discovered the way to break into native code and have access to STL containers' content when debugging using CLI :

    Tools\Options...\Debugging\General : uncheck 'Use Managed Compatibility Mode' (YES! UNCHECK IT!)

    In the native code, instead to add breakpoints, just add this :

    assert(false);

    When breaking against the shores, just click either 'Retry' to debug or 'Ignore' to continue.

    Happy debugging with Visual Studio 2015 :)

    Kochise

    0 讨论(0)
  • 2020-11-29 06:33

    I was having a similar issue in VS2015 where some variables would show the debug values, others wouldn't show anything when hovered over.

    Enabling the following setting from Andrew Arnott solved my issue: Tools -> Options -> Debugging -> General: "Use the legacy C# and VB expression evaluators"

    0 讨论(0)
  • 2020-11-29 06:33

    I found that simply changing the combobox with "Release and debug" back to debug allowed me to see the expansion of variables when debugging my code again.

    This newest solution worked for VS 2017 on my home PC.

    My work PC was able to show this expansion in 2017 after I did the "Build >> Clean Solution option and will even work when the combobox is set to "Release".

    Best of luck to anyone else that wants this wonderful debugging help form VS. I hope that by using one of these methods you're able to get back to "normal".

    0 讨论(0)
提交回复
热议问题