From acd6b25ef9e3b5795ffa03d625d3ed1815a57cdb Mon Sep 17 00:00:00 2001 From: Seb Julliand Date: Tue, 16 Apr 2024 17:46:07 +0200 Subject: [PATCH 1/3] Adapt debug error for object type Signed-off-by: Seb Julliand --- src/api/debug/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/debug/index.ts b/src/api/debug/index.ts index e2a7747e6..a7dd5b6a0 100644 --- a/src/api/debug/index.ts +++ b/src/api/debug/index.ts @@ -254,7 +254,7 @@ export async function initialize(context: ExtensionContext) { if (objectType) { startDebugging(debugType, objectType, qualifiedObject.library, qualifiedObject.object, workspaceFolder); } else { - vscode.window.showErrorMessage(`Failed to determine object type. Ensure the object exists and is a program (*PGM) or service program (*SRVPGM).`); + vscode.window.showErrorMessage(`Failed to determine object type. Ensure the object exists and is a program (*PGM)${debugType === "sep" ? " or service program (*SRVPGM)" : ""}.`); } } } else { From 5f3f68b42a73d5e13ce0c4950eae1dc3fceabb1d Mon Sep 17 00:00:00 2001 From: Seb Julliand Date: Tue, 16 Apr 2024 17:45:14 +0200 Subject: [PATCH 2/3] Allow multiple IBM i debug sessions at once Signed-off-by: Seb Julliand --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b95e2c25e..e6ae39789 100644 --- a/package.json +++ b/package.json @@ -2297,7 +2297,7 @@ "editor/title": [ { "submenu": "code-for-ibmi.debug.group", - "when": "code-for-ibmi:connected && !inDebugMode && editorLangId =~ /^rpgle$|^rpg$|^cobol$|^cl$/i", + "when": "code-for-ibmi:connected && editorLangId =~ /^rpgle$|^rpg$|^cobol$|^cl$/i", "group": "navigation@1" }, { @@ -2499,7 +2499,7 @@ }, { "submenu": "code-for-ibmi.debug.group", - "when": "view == objectBrowser && !inDebugMode && (viewItem =~ /^object.pgm.*/ || viewItem =~ /^object.srvpgm.*/)", + "when": "view == objectBrowser && viewItem =~ /^object.(pgm|srvpgm).*/", "group": "2_debug@1" }, { From 59e605acec5b504348cd1c60ff9242a1c75a7fb9 Mon Sep 17 00:00:00 2001 From: Seb Julliand Date: Tue, 16 Apr 2024 17:36:02 +0200 Subject: [PATCH 3/3] Allow debug as batch only on PGM objects Signed-off-by: Seb Julliand Signed-off-by: Seb Julliand --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e6ae39789..be34a9618 100644 --- a/package.json +++ b/package.json @@ -1813,7 +1813,7 @@ "code-for-ibmi.debug.group": [ { "command": "code-for-ibmi.debug.batch", - "when": "code-for-ibmi:debug" + "when": "code-for-ibmi:debug && viewItem =~ /^object.pgm.*/" }, { "command": "code-for-ibmi.debug.sep",