From 890946c1d290ee9469351c7f7627a13698808155 Mon Sep 17 00:00:00 2001 From: AjayBora002 Date: Mon, 13 Apr 2026 20:09:35 +0530 Subject: [PATCH] fix(vscode): use tsx for 'Run Current File' debug configuration The 'Launch Program' debug configuration used program: , which fails for .ts/.tsx files since Node.js cannot execute TypeScript natively. Updated to use pm exec tsx which leverages the project's existing tsx dependency for runtime transpilation. Fixes #22844 --- .vscode/launch.json | 11 ++++++++--- CONTRIBUTING.md | 4 ++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 0294e27ed47..591331e9956 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -41,12 +41,17 @@ "localRoot": "${workspaceFolder}/packages" }, { + "name": "CLI: Run Current File", "type": "node", "request": "launch", - "name": "Launch Program", - "skipFiles": ["/**"], "program": "${file}", - "outFiles": ["${workspaceFolder}/**/*.js"] + "runtimeArgs": ["--import", "tsx"], + "cwd": "${workspaceFolder}", + "console": "integratedTerminal", + "skipFiles": ["/**"], + "env": { + "NODE_ENV": "development" + } }, { "type": "node", diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ccc2ad70ce7..d4666df57b5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -370,8 +370,8 @@ npm run lint 2. In VS Code, use the "Attach" launch configuration (found in `.vscode/launch.json`). -Alternatively, you can use the "Launch Program" configuration in VS Code if you -prefer to launch the currently open file directly, but 'F5' is generally +Alternatively, you can use the "CLI: Run Current File" configuration in VS Code +if you prefer to launch the currently open file directly, but 'F5' is generally recommended. To hit a breakpoint inside the sandbox container run: