From 7a3190fa7fbcf45f2b69990c82517d69b5ba54ea Mon Sep 17 00:00:00 2001 From: Cedric van Putten Date: Wed, 6 Mar 2024 17:33:48 +0100 Subject: [PATCH] fix: only change to underlying vscode adapter when starting debug session (#245) This is related to a behavior change from vscode, and to microsoft/vscode#188979 --- src/expoDebuggers.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/expoDebuggers.ts b/src/expoDebuggers.ts index cc811cf..3a90d5b 100644 --- a/src/expoDebuggers.ts +++ b/src/expoDebuggers.ts @@ -116,7 +116,7 @@ export class ExpoDebuggersProvider implements vscode.DebugConfigurationProvider } return { - type: 'pwa-node', + type: DEBUG_TYPE, request: 'attach', name: config.name ?? 'Debug Expo app', @@ -162,6 +162,9 @@ export class ExpoDebuggersProvider implements vscode.DebugConfigurationProvider throw new Error('Could not resolve Expo project: ' + config.projectRoot); } + // Reuse the pwa-node debug adapter from vscode.js-debug + config.type = 'pwa-node'; + // Reuse the validated project root as cwd config.cwd = config.projectRoot;