Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable being able to edit code while debugging

Recently when I've been debugging my application, I've been able to write code into C# files when the application isn't in the broken state. I've tried totally disabling the "Edit and Continue" setting in the visual studio options but that doesn't seem to be working.

What I'm expecting to happen is when I'm debugging and I type into a C# file, I want that popup that says "Changes are not allowed while the application is running" prompting me to put a breakpoint in my code to apply changes during runtime while the application is in the paused state. I'm not sure if this was a change that was introduced into the latest 2019 build or if there's something wrong with my options. Any ideas on this one would be great.

For reference, this is the popup that I want:

enter image description here

and these are my settings:

enter image description here

and proof of the functionality that I don't want

enter image description here

like image 555
Dan Scott Avatar asked Oct 09 '19 08:10

Dan Scott


People also ask

How do you disable the Debug option Enable just my code?

To enable or disable Just My Code in Visual Studio, under Tools > Options (or Debug > Options) > Debugging > General, select or deselect Enable Just My Code.

How do I stop chrome script Debugging in Visual Studio is enabled?

Here are the steps. Go down to the Debugging > General option on the left side of the menu. Find and uncheck the Enable Javascript debugging for ASP.NET(Chrome and IE). Now, no new Chrome instance will be launched every time you run or debug your web project.


1 Answers

According to the VS Team this works as designed:

This behavior you described is expected for Visual Studio 16.3. We went through several changes on Edit and Continue and now allow editing the code while the application is running. Any errors or warnings regarding your changes will show up at the Error List Window. In order to apply these changes, you simply have to be on a break state (e.g. break all or stop on a breakpoint) and continue from there.

Source: https://developercommunity.visualstudio.com/content/problem/768979/able-to-type-while-debugging.html

like image 182
Postlagerkarte Avatar answered Nov 15 '22 12:11

Postlagerkarte