From f22842782d1554c91e8df883a66e25c438cf1da5 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Fri, 3 Jul 2020 17:30:15 +0900 Subject: [PATCH 1/5] feat: add cwd and env variables support --- package.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/package.json b/package.json index 538fda8..6979847 100644 --- a/package.json +++ b/package.json @@ -97,6 +97,22 @@ "description": "The JVM arguments if needed by your project (usually -Dfoo=bar).", "default": "" }, + "cwd": { + "type": "string", + "description": "The current working directory. Default to the project root.", + "default": "${workspaceFolder}" + }, + "envs": { + "type": "object", + "additionalProperties": { + "type": [ + "string", + "null" + ] + }, + "description": "Environment variables in key/value format. (usually { \"FOO\": \"BAR\"})", + "default": {} + }, "enableJsonLogging": { "type": "boolean", "description": "Enables logging of debug server JSON messages into a file defined by 'jsonLogFile'.", From 68d68ff24ee0bad150bd1c2193fac60ce13398a3 Mon Sep 17 00:00:00 2001 From: Mikalai Kukhta Date: Wed, 7 Aug 2024 13:40:26 +0200 Subject: [PATCH 2/5] rename envs to env to comply with other debug plugins --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index abb1019..d51dbe6 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "description": "The current working directory. Default to the project root.", "default": "${workspaceFolder}" }, - "envs": { + "env": { "type": "object", "additionalProperties": { "type": [ From ad85a4224c33ba78126650a63d3f4fb3e63eb10b Mon Sep 17 00:00:00 2001 From: Mikalai Kukhta Date: Wed, 7 Aug 2024 14:23:58 +0200 Subject: [PATCH 3/5] add envFile definition --- package.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package.json b/package.json index d51dbe6..227f905 100644 --- a/package.json +++ b/package.json @@ -121,6 +121,11 @@ "description": "Environment variables in key/value format. (usually { \"FOO\": \"BAR\"})", "default": {} }, + "envFile": { + "type": "string", + "description": "Environment variables file path. (usually .env)", + "default": {} + }, "enableJsonLogging": { "type": "boolean", "description": "Enables logging of debug server JSON messages into a file defined by 'jsonLogFile'.", From a1d952fe39d82ed9e999dce2d53534759680071d Mon Sep 17 00:00:00 2001 From: Mikalai Kukhta Date: Wed, 7 Aug 2024 14:53:04 +0200 Subject: [PATCH 4/5] inject "add-exports" exposing com.sun.tools.jdi to the adapter --- src/extension.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/extension.ts b/src/extension.ts index 6110f3a..382e08b 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -58,7 +58,10 @@ export async function activate(context: vscode.ExtensionContext): Promise ServerSetupParams = status => ({ context, status, From 3e68b875f6aeb51dc5e4b6544e3058e1c4b05f9d Mon Sep 17 00:00:00 2001 From: Mikalai Kukhta Date: Wed, 7 Aug 2024 14:55:23 +0200 Subject: [PATCH 5/5] provide sane default to envFile --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 227f905..fdad157 100644 --- a/package.json +++ b/package.json @@ -124,7 +124,7 @@ "envFile": { "type": "string", "description": "Environment variables file path. (usually .env)", - "default": {} + "default": "${workspaceFolder}/.env" }, "enableJsonLogging": { "type": "boolean",