Skip to content

Commit da3edb4

Browse files
rajbosCopilot
andauthored
fix: use esbuild as preLaunchTask so F5 debug always works (#705)
* fix: use shell type for npm compile task to fix F5 debug on Windows The 'npm' task type fails silently on Windows when npm isn't on PATH in the task runner context, leaving the terminal empty and VS Code stuck waiting on the preLaunchTask. Switching to 'type: shell' with an explicit 'npm run compile' command is reliable across platforms. Also changed reveal to 'always' so build errors are visible. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: use esbuild directly as preLaunchTask for fast, reliable F5 debug The 'npm compile' preLaunchTask chains tsc --noEmit && eslint before esbuild. Any TypeScript or lint error silently breaks the chain, leaving dist/ unbuilt and VS Code stuck on the 'Waiting for preLaunchTask' popup. Add a dedicated 'esbuild' task that runs node esbuild.js directly (~1s, no type-checking failures). This is the actual bundler needed for debugging. The full 'npm compile' task remains for CI/manual builds. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 7d853a9 commit da3edb4

2 files changed

Lines changed: 16 additions & 3 deletions

File tree

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"name": "Run Extension",
1010
"type": "extensionHost",
1111
"request": "launch",
12-
"preLaunchTask": "npm compile",
12+
"preLaunchTask": "esbuild",
1313
"args": [
1414
"--extensionDevelopmentPath=${workspaceFolder}/vscode-extension"
1515
],

.vscode/tasks.json

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,28 @@
55
"tasks": [
66
{
77
"label": "npm compile",
8-
"type": "npm",
9-
"script": "compile",
8+
"type": "shell",
9+
"command": "npm run compile",
1010
"options": {
1111
"cwd": "${workspaceFolder}/vscode-extension"
1212
},
1313
"group": {
1414
"kind": "build",
1515
"isDefault": true
1616
},
17+
"presentation": {
18+
"reveal": "always"
19+
},
20+
"problemMatcher": []
21+
},
22+
{
23+
"label": "esbuild",
24+
"type": "shell",
25+
"command": "node esbuild.js",
26+
"options": {
27+
"cwd": "${workspaceFolder}/vscode-extension"
28+
},
29+
"group": "build",
1730
"presentation": {
1831
"reveal": "silent"
1932
},

0 commit comments

Comments
 (0)