In my project which is a hybrid project (in previous it was a web forms project that then we modified to use mvc pattern).
Now I want that in debug mode, I want to change something in my cs file, and then I want the changed code to run.
I've tried enabling and disabling tools -> options -> debug -> edit and continue checkbox part.
When it is enabled I can't change code in my project while debugging. When it is disabled I can change code but it does not affect on running part. for example.
int i = 0;
if(i == 1)
return 1;
else
return 2;
In debug mode I changed i
to 1
but it stil returned 2
, in the following code, only when I stop and re-run the debugger it takes affects.
int i = 1;
if(i == 1)
return 1;
else
return 2;
BTW I am using Visual Studio 2010 version.