microsoft / microsoft/vscode-cpptools

Build command sometimes has to wait 5-10 seconds on "Fetching Build Tasks..."

Open
#10,474 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted not reproing tasks/build/debug
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Environment
  • OS and Version: Windows 11 Pro 10.0.22621
  • VS Code Version: 1.75.0
  • C/C++ Extension Version: 1.14.1
  • If using SSH remote, specify OS of remote machine: N/A
Bug Summary and Steps to Reproduce

Bug Summary:

Issuing the build command (Ctrl+B) may sometimes cause VSCode to spend 5-10 seconds "Fetching Build Tasks..." (in status bar) before showing the build tasks menu. I've narrowed down the culprit to the CppTools extension and its C/C++ task provider that suggests a task depending on the file type, aka "detected tasks" in the build menu. I was able to fix this issue by changing the "Task: Auto Detect" setting to "off".

Steps to reproduce:

  1. Open a workspace/folder with a C/C++ file.
  2. Press Ctrl+B and wait for the menu to show.
  3. If menu shows immediately, press escape.
  4. Repeat steps 2-3 until you see "Fetching Build Tasks..." in the status bar.

Expected behavior:
There shouldn't be any wait for the build tasks menu to show, especially after its already been shown once before. It should be instantaneous.

Configuration and Logs

No response

Other Extensions

No response

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the delay with Ctrl+B in a workspace containing a C/C++ file, then inspect the CppTools extension's C/C++ task provider and its detected-task behavior. Compare task fetching with Task: Auto Detect enabled and disabled. Done means the build tasks menu appears without the reported 5–10 second wait while detected tasks continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, typescript
Domain
build-system, developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.