Jonny
Jonny

Reputation: 2519

Visual studio 2012 - locals have disappeared

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

Image showing no locals

What I've tried:

Restarting Visual Studio

Restarting my computer

Checking that the loaded modules shows debug symbols are loaded

Uninstalling the TeamCity plugin that I installed yesterday

Looking under Tools/Options/Debugging for anything obvious (and disabling other extensions that had been working fine)

EDIT: I've also tried creating a new solution.

I've also noticed that the call stack shows several blank lines where I presume there are supposed to be external method names (pictured above) - I'm not sure if this is relevant, but it is worth mentioning.

Upvotes: 8

Views: 10016

Answers (6)

mohaghighat
mohaghighat

Reputation: 1343

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.

Upvotes: 3

Sam Debruyn
Sam Debruyn

Reputation: 938

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...

Upvotes: 0

Robert
Robert

Reputation: 2486

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.

Upvotes: 3

Thronk
Thronk

Reputation: 655

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

Upvotes: 9

Jonny
Jonny

Reputation: 2519

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.

Upvotes: 6

Anwar Ul-haq
Anwar Ul-haq

Reputation: 1881

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

Upvotes: 2

Related Questions