Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2017 Debugging - Disable Browser Cache

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?

like image 610
Scott Salyer Avatar asked Mar 28 '18 17:03

Scott Salyer


People also ask

How do I disable cache in dev tools?

To open Developer Tools, press the F12 key or Ctrl+Shift+I keys on the keyboard. You can also open the main menu at the top-right corner and select Developer Tools from the More Tools side menu. Here move to the Network tab and check the checkbox next to the Disable cache option.

How do I clear my browser cache in Developer Tools?

Open the developer tools window in Google Chrome. You can do this by opening the three-dot menu in the top-right corner, hovering over "More Tools" and selecting "Developer Tools." Ignoring the new window, right click the Refresh button in your browser window. Choose the final option – "Empty Cache and Hard Reload."


2 Answers

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

like image 175
tallberg Avatar answered Sep 29 '22 08:09

tallberg


• 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".

like image 29
Fletcher Avatar answered Sep 29 '22 08:09

Fletcher