I am trying to debug my ASP.NET app in a pseudo production environment, i.e. with launchSettings.json profile setting:
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Production"
}
I'd like to debug the app behaviour after my database service throws an error. The app should display Pages/Error.cshtml page. I can set a breakpoint inside OnGet
method in Pages/Error.cshtml.cs and debug it.
However, after about 20 seconds, Visual Studio displays its own error window on top of everything, with information that it failed to launch debug adapter. After clicking OK, the debug session is automatically stopped.
Is it possible to temporarily set the timeout after which this window pops up to e.g. 10 minutes?
Below is a screenshot of VS error window.