visual-studio-codevscode-tasks

How can I remove the Detected Task


Is there any way to remove the "Detected Task"? There are so many choices, I just want to leave the ones I have defined in the tasks.json file.

In the Debug window, only one choice which is defined in my launch.json file.

However, I have only defined one task in my tasks.json file so far, but there many choice show in the "Select a debug configuration".

These choices may be ones I've defined before, but I've removed those definitions in my tasks.json file.

Or are these choices automatically recognized by the VS Code system, so I can't customize the task in tasks.json file like customize debug choice in launch.json file.


Solution

  • I believe the setting you're looking to put in your settings.json file is the following:

    "task.autoDetect": "off"
    

    The setting's description:

    Controls enablement of provideTasks for all task provider extension. If the Tasks: Run Task command is slow, disabling auto detect for task providers may help. Individual extensions may also provide settings that disable auto detection.

    See also the docs on task autodetection.

    Extensions might have their own setting for their own task auto-detection features, such as the builtin TypeScript language support extension's typescript.tsc.autoDetect setting.