Clear file content cache in Visual Studio Code
Solution 1:
I think, I understood correct. You can follow below steps.
- Press Ctrl + Shift + P
- type command Clear Editor History
- Press Enter
It will solve your problem.
Solution 2:
This worked for me.
Adding this task in .vscode/tasks.json
:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "clear-editor-history",
"command": "${command:workbench.action.clearEditorHistory}"
}
]
}
And using the task in launch configuration (.vscode/launch
)
{
"version": "0.2.0",
"configurations": [
{
...
"preLaunchTask": "clear-editor-history"
...
}
]
}
Solution 3:
For me on macOS the following has worked:
- Press Cmd + Shift + P
- Type command Clear Search History
- Press Enter
Then for the search results:
- Press Cmd + Shift + P
- Type command Clear Search Results
- Press Enter