21

I get the error

changes not allowed when unmanaged debugging is enabled

Actually I get the below message but Google doesn't return many results

changes are not allowed when unmanaged debugging is enabled

What does this mean? How do I fix it? Note this is an ASP.NET project. Checkmarking Edit and Continue does not make this error go away.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131

4 Answers4

37

Go to Project Properties and uncheck Native Code in the Debuggers section of the Web tab.

EDIT: Changed for ASP .Net

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
6

The Mixed Mode debugger in Visual Studio is a completely different debugger than either the native code debugger or managed code debugger. The primary purpose is to tie into both the very complicated managed debugging API and the very complicated native debugging API at the same time to provide a reliable, usable debugger when working with native and managed code simultaneously. Due to how the debuggers are written, the Visual Studio mixed-mode debugging team would have had to completely re-implement edit-and-continue (which happens to be the most technically challenging debugging feature) to include it. I imagine this was cut because:

  • It is an extremely challenging feature to re-implement.
  • The implementation would cause significant additional coupling to internal changes in the CLR debugging API (and probably the internals) and the native debugging API.
  • The performance of the mixed-mode debugger lags the managed code debugger significantly, leading the majority of users to use the latter for general purpose debugging even without considering the ENC feature. As such, implementing the feature would attract a minimal number of users.

The benefits weighted against the practical challenges leads to an overwhelming vote of leaving this feature out.

Sam Harwell
  • 97,721
  • 20
  • 209
  • 280
3

For ASP.NET Web Application / Web Site projects go to "Web" tab and scroll to the very bottom where it says Debuggers uncheck native code

Sameer Alibhai
  • 3,092
  • 4
  • 36
  • 36
  • +1. and this already has been done. But it isnt as bad as it was before. Maybe that was the issue before. –  Feb 13 '10 at 04:31
0

In VS 2017, this option is in the "Debug" section of the project properties. Uncheck the "Enable Code Debugging" option.

Screenshot of the Project Window

SMartDev
  • 72
  • 1
  • 8