From a725f0f73e8f49e86825449ee22b1a1f7c297081 Mon Sep 17 00:00:00 2001 From: Pavel Date: Fri, 17 May 2024 10:20:38 -0700 Subject: [PATCH] fix(debug): use full config file when debugging --- package-lock.json | 4 ++-- package.json | 2 +- src/playwrightTestServer.ts | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index a77b49bf5..c33de5824 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "playwright", - "version": "1.1.2", + "version": "1.1.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "playwright", - "version": "1.1.2", + "version": "1.1.3", "dependencies": { "@babel/core": "^7.23.2", "@babel/helper-plugin-utils": "^7.22.5", diff --git a/package.json b/package.json index 9d8c7a7f1..13511063f 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "Playwright Test for VSCode", "description": "%description%", "icon": "images/playwright-logo.png", - "version": "1.1.2", + "version": "1.1.3", "publisher": "ms-playwright", "repository": "https://github.com/microsoft/playwright-vscode", "bugs": { diff --git a/src/playwrightTestServer.ts b/src/playwrightTestServer.ts index 1f98fd1d4..fd9a0cdbd 100644 --- a/src/playwrightTestServer.ts +++ b/src/playwrightTestServer.ts @@ -190,7 +190,9 @@ export class PlaywrightTestServer { } async debugTests(items: vscodeTypes.TestItem[], runOptions: PlaywrightTestRunOptions, reporter: reporterTypes.ReporterV2, token: vscodeTypes.CancellationToken): Promise { - const configFile = path.basename(this._model.config.configFile); + // Important, VSCode will change c:\\ to C:\\ in the program argument. + // This forks globals into 2 worlds. + const configFile = path.resolve(this._model.config.workspaceFolder, this._model.config.configFile); const args = ['test-server', '-c', configFile]; const addressPromise = new Promise(f => {