I have a solution with Start ASP.NET project and several VB and C# library projects. When I stopped in Visual Studio 2005 debugger in the library class code, the file is shown with small “lock”.
It doesn't allow me to do any changes, but show the message "Edit and Continue"
"Changes are not allowed when the debugger has been attached to an already running process or the code being debugged is optimized".
None of of these conditions is actually applicable for my case. Library is included in the solution, referred in Web Site project as Project and should allow me to edit it.
I've posted this as a suggestion under MS Feedback site , but it's more a bug, because it makes "Edit and continue" feature more limited then it was in Visual Studio 2003.
There is a thread in “vsnet.debugging” group, where Jeffrey Tan from MS Online Partner Support recommends “to stop the debug , change the source code in class library, then re-start the debugging again. This is the behavior of VS.net2003”. This is not correct, because VS.net2003 allowed to do modifications and continue, but changes were not in affect until the next restart.
Update: It seems that restriction is only applicable to VB libraries and C# libraries code can be edited during debugging.
“Workaround”: I found some unconvinient procedure, that allow to continue without stopping debugging.
1. Disable “Edit and Continue“.( If you didn't apply hotfix 915038 or VS 2005 Service Pack 1, it should be disabled anyway -see bug FDBK40283 ).
2.When you stopped in debugger on a particular line and want to change a file
3. Right-mouse click the file name on the tab caption and click “Copy full path“ menu
4.Start another instance of “Visual Studio 2005“ (or any another external editor).
5.Click “Open“ icon and paste file full path. Open the file and make the changes.
6.In the debugger close the file, that is editing in another editor.It is important, otherwise VS IDE will ask to reload the file with changes and can stop debugging anyway.
7. Save the changes in the editing instance of Visual Studio 2005“ (external editor).