0

I am unable to see the values of local variables in debug mode when mouse pointer placed over them or by adding add watch option in visual studio 2015. I am also getting the error

Internal error in the expression evaluator

I have tried the following to fix the error

  • Rebuilded the solution

  • Restarted Visual studio

  • Restarted My PC

  • Set Debug - > Options -> Ticked Use Mange Compatibility mode

  • Set Debug - > Options -> Ticked Use Native Compatibility mode

  • Set Debug - > Options -> Use the legacy c# and vb expression evaluators (Note:When I enable this I can see that it works for some of the codes when debugging on a device, but not all.In the emulator it works for all the code, but in earlier version of visual studio (2013) it works both for emulator and device without setting anything in visual studio at all)

    screen shoat of issue None of these solved the problem. How can i fix this ?

Vishnu Babu
  • 1,183
  • 1
  • 13
  • 37
  • 1
    It may be a bug in VS2015, I have experienced this and have seen other posts about it – pay Jun 22 '16 at 12:47
  • Use connect.microsoft.com to report debugger bugs. They'll have no use for that screenshot, you'll need to include a minimum repro project so they can reproduce it and get the bug fixed. – Hans Passant Jun 22 '16 at 12:57
  • 1
    Are you running VS as administrator? I've found this solved problems in past the now I just do this by default – Phil Blackburn Jun 23 '16 at 06:34
  • Yes! it did worked Thankzz!!!!. May be you should post this as an answer so that i can accept it!!! – Vishnu Babu Jun 23 '16 at 07:05

2 Answers2

1

This can occur when the Optimize code option is checked in Project Properties>Build

Phil Blackburn
  • 1,047
  • 1
  • 8
  • 13
1

Running the visual studio in Administrator mode seems to solve the issue also I need to put a tick mark on

Set Debug - > Options -> Use the legacy c# and vb expression evaluators

as well.

Vishnu Babu
  • 1,183
  • 1
  • 13
  • 37