I am able to edit my code in debug mode but then pop up shows the error that \"Edits were made which cannot be compiled. Execution cannot continue until the compile errors a
Potentially this is caused by Visual Studio's Edit & Continue feature. A workaround is to disable this feature:
Edit & Continue
Debug --> Options --> Debugging --> General --> uncheck Enable Edit and Continue
Solution taken from here.
Also answered here.