Visual Studio 2017 Debugging - Disable Browser Cache

7.9k Views Asked by At

I use Visual Studio 2017 for web development pretty heavily, and when you let it open a browser (Chrome is my preference, though this would apply to Edge) it often loads cached versions of scripts and CSS. I know I can go to the Network tab and choose Disable Cache, but is there a way to get VS to just always load the browser with that option selected?

2

There are 2 best solutions below

4
tallberg On BEST ANSWER

You can point cache dir to null using startup arguments for chrome.
This will disable any caching.

First manage browsers

browser select

Then add new Chrome browser with attribute: --disk-cache-dir=null

add chrome with argument

1
Fletcher On

• Go to Tools -> Options -> Debugging -> General : CHECK "Enable Just My Code".

• Go to Tools -> Options -> Debugging -> Symbols

• Click on the "..." button and create/select a new folder somewhere on your local computer to store cached symbols. Then Click on "Load all symbols" and wait for the symbols to be downloaded from Microsoft's servers, which may take a while. Note that Load all symbols button is only available while debugging.

• UNCHECK the checkmark next to "Microsoft Symbol Servers" to prevent Visual Studio from remotely querying the Microsoft servers. -> Click "OK".