Khalil Khalaf
Khalil Khalaf

Reputation: 9397

Where to find "Enable Debugging of Unmanaged Code" to be able to edit the code while the system is running?

In an older version of Visual Studio (Like the one at home, guess 2013), I am able to edit my code while the system is running but I can't continue (and I don't want to continue). While step-ping through my code, I just want to start typing and once I finish editing then to recompile.

The advantage is that while typing I can hoover my mouse and watch values/structures of the variables and edit according. It's a nice guide sometimes, like a reminder or notes.

Why my Visual Studio 2015 prevents me from editing my code? saying:

Changes are not allowed when unmanaged debugging is enabled

P.S my Edit and Continue option is enabled as suggested everywhere on the internet. And there is no Enable Unmanaged debugging option for 2015 like suggested here for 2010 How to: Enable Debugging of Unmanaged Code

Edit: It's a C#/C++ application. I didn't start the project from scratch and it's a huge one. I start it as Debugger and sometimes Release. Doesn't work on both (I don't care about the Release)

How my settings under Tools -> Options -> Debugging -> General look like:

enter image description here enter image description here

Upvotes: 13

Views: 22640

Answers (4)

NOCARRIER
NOCARRIER

Reputation: 2634

This is how to disable managed debugging (also known as "Mixed Mode") in VS 2022:

  • Right click on project
  • Properties
  • Debug
  • Open Launch Profiles UI
  • Uncheck "Native Code Debugging"

This allows for hot reload in asp.net applications.

Upvotes: 0

Sergioet
Sergioet

Reputation: 1288

For Visual Studio 2022, you need to add <EnableUnmanagedDebugging>true</EnableUnmanagedDebugging>

in your vcxproj files (under PropertyGroup Condition subset)

Upvotes: 0

Josh
Josh

Reputation: 760

use native compatibility mode when you want to break ok C++ code. Also right click on the project and check "enable native debugging" in the project properties. Those two things should allow you to debug c++ (not edit and continue, just normal debugging)

Upvotes: 3

SLaks
SLaks

Reputation: 887997

You're in the completely wrong place; that's the system-wide debug options.

As explained in the post you linked to, you need to go to the Debug tab in Project Properties.

Upvotes: 29

Related Questions