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

未关闭
#10,474 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
cpp, typescript

调研方向

首先,在包含 C/C++ 文件的工作区中使用 Ctrl+B 重现延迟,然后检查 CppTools 扩展的 C/C++ 任务提供程序及其检测到的任务行为。比较启用和禁用 Task: Auto Detect 时的任务获取情况。当构建任务菜单出现时无需经历报告的 5–10 秒等待,同时检测到的任务仍能继续工作,即表示完成。

由索引模型根据 Issue 内容生成。

描述

bug help wanted not reproing tasks/build/debug
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

主要语言
TypeScript
星标
6.2k
派生
1.7k
平均合并
14 小时 46 分钟
30 天内合并 PR
61

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/vscode-cpptools 的其他 Issue

查看 microsoft/vscode-cpptools 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。