Changing code while debuging c# Application
-
When i inser a break point and debug a c# programme i m unable to change the code in this mode(Debug Mode). I remeber previously i can change code in c# APplication.Has any body idea what reason may be ????? Why it is not allowing to change code while debugging.Now it gives follwing message on change of code "Changes are not allowed when debugger has been attached to an already running process or the code being debugged is optimized"
-
When i inser a break point and debug a c# programme i m unable to change the code in this mode(Debug Mode). I remeber previously i can change code in c# APplication.Has any body idea what reason may be ????? Why it is not allowing to change code while debugging.Now it gives follwing message on change of code "Changes are not allowed when debugger has been attached to an already running process or the code being debugged is optimized"
-
When i inser a break point and debug a c# programme i m unable to change the code in this mode(Debug Mode). I remeber previously i can change code in c# APplication.Has any body idea what reason may be ????? Why it is not allowing to change code while debugging.Now it gives follwing message on change of code "Changes are not allowed when debugger has been attached to an already running process or the code being debugged is optimized"
Are you sure that you can't? Even when the execution point is inside the same method where you want change code? ... But i think that is a dangerous practice... Sometimes when you change code often in debug mode applications behaviour change, or that's my experience. Because you change code, and seems that it don't applies changes... And when you're angry because you don't know where is the problem, you close VS, clean and rebuild your app and all is fine... That's my opinion... Have you suffered this?
Visit my blog at http://dotnetforeveryone.blogspot.com/
-
Are you sure that you can't? Even when the execution point is inside the same method where you want change code? ... But i think that is a dangerous practice... Sometimes when you change code often in debug mode applications behaviour change, or that's my experience. Because you change code, and seems that it don't applies changes... And when you're angry because you don't know where is the problem, you close VS, clean and rebuild your app and all is fine... That's my opinion... Have you suffered this?
Visit my blog at http://dotnetforeveryone.blogspot.com/
Yes I M sure .I have told that i cannot change even within the same method .Dunot know whts happened to this application
-
When i inser a break point and debug a c# programme i m unable to change the code in this mode(Debug Mode). I remeber previously i can change code in c# APplication.Has any body idea what reason may be ????? Why it is not allowing to change code while debugging.Now it gives follwing message on change of code "Changes are not allowed when debugger has been attached to an already running process or the code being debugged is optimized"
Is "Edit and Continue" enabled? (Tools->Options->Debugging->Edit and Continue)
-
Yes I M sure .I have told that i cannot change even within the same method .Dunot know whts happened to this application
You can, simply enable Edit And Continue as proposed in another post in the project options. Although it will only work if the process was started by the debugger and not if the debugger is attached to the process.
-^-^-^-^-^- no risk no funk ................... please vote ------>
-
hi, As far as i know you can make changes to the code during runtime only in a web application. You cannot do it in a windows application. Thanks Regards Anuradha
That's strange, edit and continue only ever works for me in a winforms application. It never works for me in web apps. You do need to make sure that you have "break all processes when one process breaks" checked (*This may or may not be the exact text) Russell