From 792e2892c239900e22d35254c412fc4ba16893fb Mon Sep 17 00:00:00 2001 From: Ben King <9087625+benfdking@users.noreply.github.com> Date: Fri, 13 Jun 2025 11:28:52 +0100 Subject: [PATCH] chore: allow debugging vscode tests --- tooling/vscode/settings.json | 12 +++++++++++- vscode/extension/tests/utils.ts | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/tooling/vscode/settings.json b/tooling/vscode/settings.json index 2c1f18f540..6cdfa704c7 100644 --- a/tooling/vscode/settings.json +++ b/tooling/vscode/settings.json @@ -13,5 +13,15 @@ "vscode/react/dist": true }, // Turn off tsc task auto detection since we have the necessary tasks as npm scripts - "typescript.tsc.autoDetect": "off" + "typescript.tsc.autoDetect": "off", + // Playwright configuration + // Python configuration to ensure consistent environment + "python.defaultInterpreterPath": "${env:VIRTUAL_ENV}/bin/python", + "python.terminal.activateEnvironment": true, + "terminal.integrated.env.osx": { + "PATH": "${env:VIRTUAL_ENV}/bin:${env:PATH}" + }, + "terminal.integrated.env.linux": { + "PATH": "${env:VIRTUAL_ENV}/bin:${env:PATH}" + } } diff --git a/vscode/extension/tests/utils.ts b/vscode/extension/tests/utils.ts index 34301ba4f2..1a2c55e1e6 100644 --- a/vscode/extension/tests/utils.ts +++ b/vscode/extension/tests/utils.ts @@ -5,7 +5,7 @@ import { _electron as electron, Page } from '@playwright/test' // Absolute path to the VS Code executable you downloaded in step 1. export const VS_CODE_EXE = fs.readJsonSync( - '.vscode-test/paths.json', + path.join(__dirname, '..', '.vscode-test', 'paths.json'), ).executablePath // Where your extension lives on disk export const EXT_PATH = path.resolve(__dirname, '..')