Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to persist cookies between visual studio debug sessions

I have an authentication cookie that gets set after I hit a login screen in my local environment. That cookie has been set to be persistent and has been given a timeout period of 7 days in the future.

enter image description here

When I end my debug session and start debugging after another build the cookie is not present. This happens for every browser. Is there a way to get Visual Studio to remember the persistent cookie after a debug session completes?

like image 880
aokelly Avatar asked Sep 14 '17 18:09

aokelly


1 Answers

The solution I found was to make it so that new instances of .NET Core MVC would not open up in a brand new window, but an existing one. I changed one setting

1)Tools menu 2)Options... 3)Debugging > General 4)Uncheck "Enable JavaScript debugging for ASP.NET"

And when I run the app with F5 an instance fires up in an existing instance of chrome and I can reuse the cookies that are already in existence. With that box checked it always opens into a new instance of chrome and cookies are not present.

like image 68
aokelly Avatar answered Oct 23 '22 10:10

aokelly