Clear file content cache in Visual Studio Code

前端 未结 3 1167
醉话见心
醉话见心 2020-12-12 20:06

My Visual Studio code, on a Windows machine, keeps on showing me the previous content of a file even after this one has been updated, while notepad ++ doesn\'t

相关标签:
3条回答
  • 2020-12-12 20:49

    I think, I understood correct. You can follow below steps.

    1. Press Ctrl + Shift + P
    2. type command Clear Editor History
    3. Press Enter

    It will solve your problem.

    0 讨论(0)
  • 2020-12-12 20:50

    For me on macOS the following has worked:

    1. Press Cmd + Shift + P
    2. Type command Clear Search History
    3. Press Enter

    Then for the search results:

    1. Press Cmd + Shift + P
    2. Type command Clear Search Results
    3. Press Enter
    0 讨论(0)
  • 2020-12-12 20:52

    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"
          ...
        }
      ]
    }
    
    0 讨论(0)
提交回复
热议问题