From dca8730e60857376bffbe102bf676691db02fd92 Mon Sep 17 00:00:00 2001 From: Nick Rolfe Date: Mon, 5 Oct 2026 11:48:02 +0000 Subject: [PATCH] Fix launching/debugging of tests from VS Code Passing the `--no-experimental-strip-types` flag is necessary, but for some launch configurations it was getting stripped from the `NODE_OPTIONS` env var. Passing it via `runtimeArgs` instead seems to work, and allows me to debug the integration tests. --- .vscode/launch.json | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index ea33e4d0603..3eef437d35e 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -31,12 +31,12 @@ "type": "node", "request": "launch", "program": "${workspaceFolder}/extensions/ql-vscode/node_modules/jest/bin/jest.js", + "runtimeArgs": ["--no-experimental-strip-types"], "showAsyncStacks": true, "cwd": "${workspaceFolder}/extensions/ql-vscode", "env": { "LANG": "en-US", - "TZ": "UTC", - "NODE_OPTIONS": "--no-experimental-strip-types" + "TZ": "UTC" }, "args": [ "--projects", @@ -52,12 +52,12 @@ "type": "node", "request": "launch", "program": "${workspaceFolder}/extensions/ql-vscode/node_modules/jest/bin/jest.js", + "runtimeArgs": ["--no-experimental-strip-types"], "showAsyncStacks": true, "cwd": "${workspaceFolder}/extensions/ql-vscode", "env": { "LANG": "en-US", - "TZ": "UTC", - "NODE_OPTIONS": "--no-experimental-strip-types" + "TZ": "UTC" }, "args": [ "--projects", @@ -77,11 +77,9 @@ "type": "node", "request": "launch", "program": "${workspaceFolder}/extensions/ql-vscode/node_modules/jest/bin/jest.js", + "runtimeArgs": ["--no-experimental-strip-types"], "showAsyncStacks": true, "cwd": "${workspaceFolder}/extensions/ql-vscode", - "env": { - "NODE_OPTIONS": "--no-experimental-strip-types" - }, "args": [ "--projects", "src/view" @@ -96,11 +94,9 @@ "type": "node", "request": "launch", "program": "${workspaceFolder}/extensions/ql-vscode/node_modules/jest/bin/jest.js", + "runtimeArgs": ["--no-experimental-strip-types"], "showAsyncStacks": true, "cwd": "${workspaceFolder}/extensions/ql-vscode", - "env": { - "NODE_OPTIONS": "--no-experimental-strip-types" - }, "args": [ "--projects", "test/vscode-tests/no-workspace" @@ -115,11 +111,9 @@ "type": "node", "request": "launch", "program": "${workspaceFolder}/extensions/ql-vscode/node_modules/jest/bin/jest.js", + "runtimeArgs": ["--no-experimental-strip-types"], "showAsyncStacks": true, "cwd": "${workspaceFolder}/extensions/ql-vscode", - "env": { - "NODE_OPTIONS": "--no-experimental-strip-types" - }, "args": [ "--projects", "test/vscode-tests/minimal-workspace" @@ -134,6 +128,7 @@ "type": "node", "request": "launch", "program": "${workspaceFolder}/extensions/ql-vscode/node_modules/jest/bin/jest.js", + "runtimeArgs": ["--no-experimental-strip-types"], "showAsyncStacks": true, "cwd": "${workspaceFolder}/extensions/ql-vscode", "args": [ @@ -141,7 +136,6 @@ "test/vscode-tests/cli-integration" ], "env": { - "NODE_OPTIONS": "--no-experimental-strip-types", // Optionally, set the version to use for the integration tests. // Use "nightly" to use the latest nightly build. // "CLI_VERSION": "2.7.0",