Visual studio 2012 - locals have disappeared

后端 未结 6 1890
遇见更好的自我
遇见更好的自我 2021-01-18 00:54

While debugging VS2012 I have found that I can no longer access variable values:

  • The Locals window does not show anything (pictured below).
  • The Watch
相关标签:
6条回答
  • 2021-01-18 01:12

    Please check the answer here.

    In a nutshell, you need to open: Tools > Options > Debugger > General, and enable the flag [Use Managed Compatibility Mode] at the end of the list.

    0 讨论(0)
  • 2021-01-18 01:19

    That happens sometime when your Optimize Code box is ticked in project properties under Build section.

    0 讨论(0)
  • 2021-01-18 01:23

    I've eventually managed to sort this out by myself - so I'll give my solution here in case anyone else has the same problem:

    I found that in Tools->Options->Debugging->Symbols was pointing to an old NuGet symbol server. Somehow a wrong symbol server looked like it was taking down the entire Locals and Immediate Window systems.

    Updating the symbol server fixed my problems.

    0 讨论(0)
  • 2021-01-18 01:27

    I had the same problem with Visual Studio 2013 Update 5 on Windows 10 while using remote debugging.

    According to another SO question the locals/variables are broken in the remote debugging tools.

    I haven't found a solution yet, but I'm going to switch to Visual Studio 2015 so I haven't really been looking for it either...

    0 讨论(0)
  • 2021-01-18 01:32

    I will add this answer as I had the same problem with a different resolution.

    I had mistakenly closed the locals window and could not find it as it was not with other windows under the VIEW menu. I found it under the DEBUG menu Windows option.

    or Optionally:

    Ctrl+Alt+V, L

    0 讨论(0)
  • 2021-01-18 01:35

    I will add this answer as I had the same problem with a different resolution.

    I got this too in a Web project. Neither restarting Visual Studio or any other solution in this thread sovled it.

    My solution was to restart IIS. After that I rebuilt the project and started it and got locals to work again.

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