Skip to content

Commit

Permalink
Merge pull request #1989 from codefori/fix/multiDebugSRVPGM
Browse files Browse the repository at this point in the history
Do not allow debug batch on *SRVPGM / Allow multiple debug sessions
  • Loading branch information
sebjulliand authored Apr 16, 2024
2 parents 8239670 + 59e605a commit 7948a84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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"
},
{
Expand Down Expand Up @@ -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"
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/api/debug/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7948a84

Please sign in to comment.