How to automatically stop debugging when starting code editing?

I am working on an ASP.NET project. When I debug, I often want to switch from my browser to Visual Studio (2008) and edit the code. Visual Studio will then not allow me to edit the code unless I explicitly exit debugging in the first place.

Is there a way to configure Visual Studio so that it automatically stops debugging and allows me to edit the code, or do I need to stop it manually each time?

Disabling editing and continuing allows me to edit the code, but this does not force VS to stop debugging ...

+7
debugging visual-studio
source share
3 answers

Yes, it can be done. By default, this feature is disabled. To enable "Edit" and "Continue", go to "Tools" .. "Options" in the IDE menu of the visual studio. Open the Debug section of the tree and click Modify and Continue. Make sure the "Enable editing and continued" checkbox is selected. If you are using VS 2005 Professional, you may need to click the checkbox at the bottom of this screen to say something like Show all options.

alt text

UPDATE You must be at a breakpoint in your code for editing. You cannot edit method signatures, add new methods, etc. Changes like this were not meant to be edited and continued, and I cannot even think about how this will be implemented by Microsoft.

0
source share

Work so that you can edit your code during debugging. In the case against 2012, go to Tools → Debugging → Change and continue uncheck the box “Enable editing and continue” and do not forget to rebuild / reinstall after editing enter image description here

0
source share

Instead of debugging Visual Studio, try just creating a project. Look in the section "Debug-> Build {projectname}."

This will not block editing your code. Just remember to rebuild every time you want to see the effect of your changes.

-2
source share

All Articles