Avoid jump to Program.cs in Visual Studio 2017 when Debug.BreakAll called on ASP.NET Core

Viewed 296

When I want to edit C# code during debug and hit the break all button, VS automatically jumps to Program.cs. The following screencast shows the problem: I want to edit HomeController, VS jumps to Program.cs. Now I've to go back to HomeController, edit, save and continue so that my changes take effect:

Example

It's annoying since more clicks are required and I do this often during development cause starting an ASP.NET Core app with debugger take a few seconds. When I do this on every change, Developmemt got slabby. So I'd like to use the BreakAll functionality to apply changes directly without restart.

How can I stop VS from automatically open Program.cs? Are there even better ways to edit code during a debug session fast?

I'm using Kestrel. IIS would be possible if required but I prefer Kestrel since the ASP.NET Core app will run on Linux.

Only found this question but that's not really usefull: [DebuggerStepThrough] stop VS from opening the Program.cs tab, but instead open another tab that say there is no code to display, so we've to close this one, too.

0 Answers
Related