From 123fbfb12ad325fff45aa2d7b122502bac430fca Mon Sep 17 00:00:00 2001 From: Danny Tuppeny Date: Wed, 16 Apr 2025 17:46:22 +0100 Subject: [PATCH] Fix running adapter in external mode --- package.json | 5 +++-- src/tests/adapter.test.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index b646a7fc..297f0974 100644 --- a/package.json +++ b/package.json @@ -33,8 +33,9 @@ "esbuild-base": "esbuild ./src/extension.ts --bundle --tsconfig=./tsconfig.json --external:vscode --format=cjs --platform=node --outfile=dist/extension.js", "watch": "npm run -S esbuild-base -- --sourcemap --sources-content=false --watch", "esbuild-web": "esbuild ./src/web-extension.ts --bundle --tsconfig=./tsconfig.json --external:vscode --format=cjs --platform=browser --outfile=dist/web-extension.js", + "esbuild-adapter": "esbuild ./src/debugAdapter.ts --bundle --tsconfig=./tsconfig.json --external:vscode --format=cjs --platform=node --outfile=dist/debugAdapter.js", "watch-web": "npm run -S esbuild-web -- --sourcemap --sources-content=false --watch", - "build": "npm run -S esbuild-base -- --sourcemap --sources-content=false && npm run -S esbuild-web -- --sourcemap --sources-content=false", + "build": "npm run -S esbuild-base -- --sourcemap --sources-content=false && npm run -S esbuild-web -- --sourcemap --sources-content=false && npm run -S esbuild-adapter -- --sourcemap --sources-content=false", "package": "vsce package", "publish": "vsce publish", "publish-pre-release": "vsce publish --pre-release", @@ -136,7 +137,7 @@ "markdown" ], "label": "Mock Debug", - "program": "./out/debugAdapter.js", + "program": "./dist/debugAdapter.js", "runtime": "node", "configurationAttributes": { "launch": { diff --git a/src/tests/adapter.test.ts b/src/tests/adapter.test.ts index b45679c6..bcfb3512 100644 --- a/src/tests/adapter.test.ts +++ b/src/tests/adapter.test.ts @@ -10,7 +10,7 @@ import {DebugProtocol} from '@vscode/debugprotocol'; suite('Node Debug Adapter', () => { - const DEBUG_ADAPTER = './out/debugAdapter.js'; + const DEBUG_ADAPTER = './dist/debugAdapter.js'; const PROJECT_ROOT = Path.join(__dirname, '../../'); const DATA_ROOT = Path.join(PROJECT_ROOT, 'src/tests/data/');