Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>RunTasksNew to Visual Studio Code? Get it now.
RunTasks

RunTasks

easyatm

|
14 installs
| (0) | Free
Run .vscode/tasks.json tasks instantly — no extension activation delays
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info
中文说明

RunTasks

直接在资源管理器侧栏运行 tasks.json 和 package.json 中的任务,避免触发其他任务扩展的延迟激活。

主要特性

  • 直接执行缓存的 vscode.Task,避免走 workbench.action.tasks.runTask。
  • 同时展示 vscode 任务与 npm 脚本,支持多根工作区和主工作区下一级物理子目录。
  • 主工作区和二级文件夹都会始终保留 vscode / npm 来源分组,即使当前只有一种任务来源。
  • 只要有任务正在运行,列表顶部就会新增“运行中”分组,集中显示当前运行项。
  • 点击未运行任务时,会用预览标签页定位到对应的 tasks.json 或 package.json 定义行。
  • 点击运行中任务时,会先定位到该任务终端,再预览对应配置行。
  • 运行中任务继续使用 VS Code 默认的旋转图标提示状态,运行中分组则使用扩展 logo 图标。
  • 隐藏、收藏、固定、快捷键、运行时聚焦终端、自动运行、显示名重命名都写入任务所属文件夹的 .vscode/settings.json,多根工作区会忽略 .code-workspace 中的 runTasks.* 设置;配置键按文件夹内稳定标识保存,例如同一个文件夹无论独立打开还是作为多根工作区打开都会使用 vscode:root:<label>。
  • 加载任务时会在 RunTasks 输出通道记录 .code-workspace 文件、每个工作区文件夹,以及候选 tasks.json / package.json 的完整路径和加载数量,便于排查多根工作区扫描问题。
  • 逻辑型右键菜单项使用勾选文案表达当前状态,例如 ✓ 收藏、✓ 固定到状态栏、✓ 运行时聚焦终端。
  • 任务执行时默认显示并聚焦终端,右键菜单默认显示 ✓ 运行时聚焦终端;runTasks.hiddenTerminalTasks 记录按任务关闭聚焦终端的例外,runTasks.revealTerminalTasks 仅保留为历史兼容配置,并可用 hidden:<preferenceKey> 兜底存储旧扩展宿主中的隐藏状态。
  • runTasks.autoRunTasks 会在 VS Code 启动后自动拉起对应任务;任务稳定运行后若意外退出会立即重启,手动点停止则暂停本次会话中的自动重启。
  • runTasks.renamedTaskLabels 只改扩展里的显示名,原始 label 仍用于运行、依赖匹配和定位;在“重命名显示名”输入空串会恢复默认名称。
  • 图标会优先使用 tasks.json 的 icon.id / icon.color;自动推断时先匹配去掉扩展名后的命令,再用命令与参数中的首个有效扩展名兜底。npm 脚本会按真实脚本命令推断,并会追踪同一 package.json 中的 npm run <script> 引用。任务列表使用自定义 SVG,固定到状态栏时使用同一图标集合注册出的 runtasks-* 图标。

开发

  • npm install
  • npm run compile
  • 按 F5 启动扩展宿主调试
  • npm run package

RunTasks

Run tasks from tasks.json and package.json directly in the Explorer view without waking up every task-provider extension in VS Code.

Highlights

  • Executes cached vscode.Task objects directly instead of routing through workbench.action.tasks.runTask.
  • Shows both vscode tasks and npm scripts, including multi-root workspaces and first-level physical subfolders under the primary workspace.
  • Always keeps vscode and npm source groups for both the main workspace and nested folders, even when only one source exists.
  • Adds a Running group at the top whenever any task is active.
  • Clicking an idle task previews the matching definition line in tasks.json or package.json.
  • Clicking a running task reveals its terminal and also previews the corresponding configuration line.
  • Running tasks keep the default spinning indicator, while the Running group uses the extension logo.
  • Hide, favorite, pin, shortcut, terminal focus, auto-run, and display-name rename preferences are stored in the owning folder's .vscode/settings.json; runTasks.* values in .code-workspace are ignored in multi-root workspaces, and folder-level preference keys are stable across open modes, for example vscode:root:<label>.
  • Task loading writes the .code-workspace file, each workspace folder, and every candidate tasks.json / package.json path plus loaded counts to the RunTasks output channel, making multi-root scan issues visible.
  • Checked menu states are shown with text markers such as ✓ Favorite and ✓ Focus Terminal on Run.
  • Task execution reveals and focuses the terminal by default, and the context menu shows ✓ Focus Terminal on Run unless the task is explicitly hidden; runTasks.hiddenTerminalTasks stores per-task exceptions, while runTasks.revealTerminalTasks remains as a legacy compatibility setting and can store hidden:<preferenceKey> fallback entries in older extension hosts.
  • runTasks.autoRunTasks starts selected tasks after VS Code launches; once a task stays up, unexpected exits trigger an immediate restart until the user stops it manually.
  • runTasks.renamedTaskLabels only affects the name shown by RunTasks; the original task label still drives execution and matching, and leaving the rename input empty restores the default name.
  • Icons prefer icon.id / icon.color from tasks.json; automatic inference first matches the command name after stripping executable extensions, then falls back to the first relevant extension found in the command or arguments. npm scripts infer from their real script commands and follow same-package npm run <script> references. The task list uses custom SVG assets, and pinned status bar items use contributed runtasks-* icons generated from the same icon set.

Author: easyatm

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft