Telefisch
Telefisch

Reputation: 315

How to debug ASP.Net MVC in Visual Studio 2019


I was hunting a phantom-problem, until I recognized that the debugging wasn't working as expected.

I tried to debug some controller-code (c#) in my ASP.Net application and for this, I stopped the excecution, using a breakpoint (F9).

I started debugging with F5 and the code stopped, as expected at the breakpoint. There, I tried to fetch some data, using different approaches. None of the tries gave me the expected result so after a while, I recognized, that with every excecution the same compiled code is used and not the code, I was watching (and changing) in the editor.

I'm pretty sure, that in VS2017 it worked that way, so I could change the code while excecution.
How can I debug the C# code (and change the code) while excecution?

Thanks

Upvotes: 0

Views: 2016

Answers (1)

Prany
Prany

Reputation: 2133

You can do it in Vs2019 by In Tools > Options > (or Debug > Options) > Debugging > General, select Edit and Continue in the right pane.

enter image description here

Upvotes: 2

Related Questions