Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Edit & Continue doesn't work

I'm trying to get managed Edit & Continue working (in Visual Studio 2015 v14.0.25425.01 update 3) and it's giving me the dreaded dialog, "Changes are not allowed in the following cases:"

  • Attached to a process that does not support Edit and Continue on attach.

    1. I'm using IISExpress v10.0.14358.1000, on Windows 10.0.10586, x64.
    2. I have 'Use the 64 bit version of IIS express for web sites and project' checked in Tools->Options. (although, i also get the same error with 32-bit iisexpress)
    3. all my code is compiled 'Any CPU'
  • The code being debugged was optimized

    1. Nope, the all the code is built with the DEBUG constant set, and no optimizations.
  • The assembly being debugged is loaded as domain-neutral

    1. Nope, i checked with Process Explorer, the assembly isn't loaded DomainNeutral.
  • The assembly being debugged was loaded through reflection.

    1. Not sure about this, but it's a regular ASP.NET MVC 5 app.
  • Intellitrace events and call information is enabled.

    1. Nope, intellitrace is disabled in Tools->Options->Intellitrace.
  • The .NET Runtime this program is running on does not support edit and continue.

    1. Not sure. It's built against ".NET Framework 4.6.1", and the first symbol load is "'iisexpress.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'"

some other things:

  • in the 'Web' project settings, both the 'ASP.NET' and 'Enable Edit & Continue' checkboxes are set (and none of the others).
  • i have 'Edit and Continue' enabled in the Debugger settings.
  • i have compatibility modes disabled in the Debugger settings.
  • i have tried deleting my .suo files and the .vs directory, cleaning out my temporary directories, doing a full rebuild

what else can i try?

PS. if anyone on the VS debugger team is reading this, can i ask a favor? please kill this dialog and replace it with something that indicates the actual cause of the problem. You have the debuggee right there, and the solution, you can determine which of these is causing the problem and you can have a button which fixes the problem with a single click.

like image 738
Spongman Avatar asked Oct 06 '16 22:10

Spongman


1 Answers

ok, for posterity. it turns out that the problem was caused by an environment variable (which presumably was configured by the profiler at some point):

COR_ENABLE_PROFILING=1

removing this fixes edit & continue.

it would be great if the error popup could mention this, or even detect it and give you an option to fix it for you...

like image 126
Spongman Avatar answered Oct 01 '22 15:10

Spongman