How to edit C # code in Visual Studio while working, NOT with editing and continuing

I am working on a project in C # where the code relies on polling a web server for a report, it can take from minutes to an hour to generate and respond. I would like to be able to run my project and see how it reacts, as well as continue working on other parts of the code. I do not want to do Edit & Continue because it will pause or change what I run.

I tried to run it in Release mode, so I am not debugging, but Visual Studio still complains that I cannot edit the code during debugging. Any advice? Is it possible?

Thanks in advance for any help or information.

+4
source share
2 answers

When you are a F5 project, whether Debug or Release, Visual Studio will attach to the process, lock the file. Try to start without binding (Ctrl + F5).

The rebuild will try to overwrite the executable file, which probably could not be executed because it is locked during operation, even without a debugger attached. Thus, you cannot compile or debug your new version while the older one is working.

Expand the executable file somewhere else, run it, attach to it using another instance of Visual Studio, and continue editing in your first instance.

+7
source

Run with Ctrl-F5, not F5 (or the Run button). This is “Start without debugging,” also available in the Debug menu.

+3

Source: https://habr.com/ru/post/1539950/


All Articles