Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging with Chrome shows "Restore pages?" pop-up every time

If I press the stop debugging button while debugging my ASP.NET Core app in Google Chrome it closes the Kestrel process window and the Chrome window that opens automatically on launching Debug. This is great and convenient!

Unfortunately it seems like Visual Studio closing Chrome in this way confuses Chrome and makes it think it has crashed. So every time I launch debugging in Visual Studio, a new Chrome window opens, and I see this annoying pop-up:

"Restore pages?" pop-up

I found a similar issue brought up here, but it is for VS Code instead of VS2017. I don't think launch.json is a concept in VS2017 so I have no idea how to implement that workaround.

How can I prevent this from happening? Thanks!

like image 327
Kyle V. Avatar asked Nov 08 '22 20:11

Kyle V.


1 Answers

Close all open Chrome windows

Edit file: "%UserProfile%\AppData\Local\Google\Chrome\User Data\Default\Preferences"

Set: "exit_type": "none"

and "exited_cleanly":true

Change the Preferences file to readonly

like image 107
WapTrapDiep Avatar answered Dec 25 '22 02:12

WapTrapDiep