How to clear VSCode cache

  1. Close VSCode and kill any background processes running in the task manager;

  2. Open the path C:\Users\<user_name>\AppData\Roaming\Code;

  3. Clear the contents of the folders Cache, CachedData, CachedExtensions, CachedExtensionVSIXs (if this folder exists) and Code Cache.

Clear the VSCode cache to solve the following error in Flutter when opening the Flutter widget inspector:

Error loading webview: Error: Could not register service workers: TypeError: Failed to register a ServiceWorker for scope