简体   繁体   中英

How to prevent MS Edge DevTools from stopping Visual Studio .NET MVC Application?

Closing MS Edge DevTools stops a running Visual Studio web project. How do I prevent this?

I have a .NET MVC app that I am developing. For local testing and debugging I run the web project from Visual Studio using IIS Express. (Visual Studio Pro 2017 v.15.9.5)

It is not uncommon for me to open the Edge DevTools (F12) to inspect JS or CSS. The problem is that once the DevTools window is open if the DevTools are closed or even the web page is refreshed it causes Visual Studio to stop running/debugging the web application.

I have tried uninstalling the TelemetryCorrelation NuGet package (& its dependencies) from the project. I have made sure that the following configurations are unchecked in VS.

  • (unchecked) Enable Diagnostic Tools while debugging
  • (unchecked) Automatically close the console when debugging
  • (unchecked) Enable Edge Developers Tools for WUP JavaScript Apps (Chrome, Edge, and IE)

Using a different browser is not a solid option for me. I am writing an internal application and Edge is the "company supported" browser so I need to develop and debug with the same browsers my users will use.

EDIT before confirming as duplicate : Although my issue was the opposite from the debugger closing the browser, the same configuration changes fixed my issue. Weirdly the behavior I have reported was ONLY in Edge, not in FF or IE. I was not having the opposite issues, stopping the debugger did not close the browser.

I was overlooking the "Stop debugger when browser window is closed, close browser when debugging stops" configuration b/c I was looking under the "Debugging" configuration heading, not "Projects and Solutions".

My solution was to uncheck the "Stop debugger when browser window is closed, close browser when debugging stops" configuration in Visual Studio.

I was overlooking that configuration because I was looking under the "Debugging" configuration heading, not "Projects and Solutions".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM