Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Edit source code when debugging

I have VS2005 and I am currently trying to debug an ASP.net web application. I want to change some code around in the code behind file, but every time I stop at a break point and try to edit something I get the following error message: "Changes are not allowed when the debugger has been attached to an already running process or the code being debugged is optimized."

I'm pretty sure I have all the "Edit and Continue" options enabled. Any suggestions?

like image 837
Crackerjack Avatar asked Sep 16 '08 20:09

Crackerjack


1 Answers

This may seem counter-intuitive, but turn edit and continue off.

There might be another "allow me to edit read-only files" or "allow me to edit even when I am debugging...no really!" setting somewhere, but I don't have 2005 to look at to check.

In 2008, turn off edit and continue and you can edit while it's running (but those changes aren't appplied.)

If you actually want to use edit and continue, you also have to enable it for the project, on the web tab of the project settings.

like image 87
Chris Bilson Avatar answered Sep 23 '22 15:09

Chris Bilson