title: Edit and Continue: "Changes are not allowed when..."
body: <p>Even if I create a clean WinForms project, Edit and Continue doesn't work and gives me the error:</p>
  <blockquote>
  <p>Changes are not allowed when the debugger has been attached to an already running process or the code being debugged was optimized at build or run time.</p>
  </blockquote>
  <ol>
  <li>Edit and Continue option is checked in Tools → Options → Debugging.</li>
  <li>Optimization is not enabled.</li>
  <li>Seems like there is no any managed profiler set up.</li>
  <li>I am running in Debug mode</li>
  <li>I am running on x64 CPU and Windows XP 32-bit, but setting platform target to x86 rather than AnyCpu doesn't help.</li>
  <li>Repairing Visual Studio installation doesn't help.</li>
  </ol>
  <p>I also found <a href="http://msdn.microsoft.com/en-us/library/ms164927(VS.80).aspx" rel="noreferrer">this article</a> on MSDN website:</p>
  <blockquote>
  <p><strong>Unsupported Scenarios</strong></p>
  <p>Edit and Continue is not available in the following debugging scenarios:</p>
  <ul>
  <li><p>Debugging on Windows 98.</p>
  </li>
  <li><p>Mixed-mode (native/managed) debugging.</p>
  </li>
  <li><p>SQL debugging.</p>
  </li>
  <li><p>Debugging a Dr. Watson dump.</p>
  </li>
  <li><p>Editing code after an unhandled exception, when the &quot;Unwind the call stack on unhandled exceptions&quot; option is not selected.</p>
  </li>
  <li><p>Debugging an embedded runtime application.</p>
  </li>
  <li><p>Debugging an application with Attach to rather than running the application with Start from the Debug menu.</p>
  </li>
  <li><p>Debugging optimized code.</p>
  </li>
  <li><p>Debugging managed code when the target is a 64-bit application. If you want to use Edit and Continue, you must set the target to x86. (Project Properties, Compile tab, Advanced Compiler setting.).</p>
  </li>
  <li><p>Debugging an old version of your code after a new version failed to build due to build errors.</p>
  </li>
  </ul>
  </blockquote>
  <p>But I can answer &quot;No&quot; to every item in this list.</p>
  <p>It worked before, but several days ago it stopped working, and I don't know what could be the reason.</p>