Skip to content

Commit

Permalink
Add configuration option to override Debug Job
Browse files Browse the repository at this point in the history
Queue.
  • Loading branch information
krethan committed Feb 20, 2024
1 parent b6daef1 commit bc104d1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/api/Configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export namespace ConnectionConfiguration {
debugIsSecure: boolean;
debugUpdateProductionFiles: boolean;
debugEnableDebugTracing: boolean;
debugJobQueue: string;
readOnlyMode: boolean;
quickConnect: boolean;
usesBash: boolean;
Expand Down Expand Up @@ -139,6 +140,7 @@ export namespace ConnectionConfiguration {
debugIsSecure: (parameters.debugIsSecure === true),
debugUpdateProductionFiles: (parameters.debugUpdateProductionFiles === true),
debugEnableDebugTracing: (parameters.debugEnableDebugTracing === true),
debugJobQueue: (parameters.debugJobQueue || "QSYSNOMAX"),
readOnlyMode: (parameters.readOnlyMode === true),
quickConnect: (parameters.quickConnect === true || parameters.quickConnect === undefined),
usesBash: (parameters.usesBash === undefined),
Expand Down
3 changes: 2 additions & 1 deletion src/api/debug/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ export async function startDebug(instance: Instance, options: DebugOptions) {
const port = config?.debugPort;
const updateProductionFiles = config?.debugUpdateProductionFiles;
const enableDebugTracing = config?.debugEnableDebugTracing;
const jobQueue = config?.debugJobQueue;

let secure = true;

Expand Down Expand Up @@ -506,7 +507,7 @@ export async function startDebug(instance: Instance, options: DebugOptions) {
"ignoreCertificateErrors": !secure,
"library": options.library.toUpperCase(),
"program": options.object.toUpperCase(),
"startBatchJobCommand": `SBMJOB CMD(${currentCommand}) INLLIBL(${options.libraries.libraryList.join(` `)}) CURLIB(${options.libraries.currentLibrary}) JOBQ(QSYSNOMAX) MSGQ(*USRPRF)`,
"startBatchJobCommand": `SBMJOB CMD(${currentCommand}) INLLIBL(${options.libraries.libraryList.join(` `)}) CURLIB(${options.libraries.currentLibrary}) JOBQ(${jobQueue}) MSGQ(*USRPRF)`,
"updateProductionFiles": updateProductionFiles,
"trace": enableDebugTracing,
};
Expand Down
7 changes: 5 additions & 2 deletions src/webviews/settings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,11 @@ export class SettingsUI {
const debuggerTab = new Section();
if (connection && connection.remoteFeatures[`startDebugService.sh`]) {
debuggerTab
.addInput(`debugPort`, `Debug port`, `Default secure port is <code>8005</code>. Tells the client which port the debug service is running on.`, { default: config.debugPort, minlength: 1, maxlength: 5, regexTest: `^\\d+$` })
.addCheckbox(`debugUpdateProductionFiles`, `Update production files`, `Determines whether the job being debugged can update objects in production (<code>*PROD</code>) libraries.`, config.debugUpdateProductionFiles)
.addInput(`debugPort`, `Debug port`, `Default secure port is <code>8005</code>. Tells the client which port the debug service is running on.`, { default: config.debugPort, minlength: 1, maxlength: 5, regexTest: `^\\d+$` });
debuggerTab
.addHorizontalRule()
.addInput(`debugJobQueue`, `Debug Job Queue`, `Default job queue is <code>QSYSNOMAX</code>. Tells what queue to submit job for debugging.`, { default: config.debugJobQueue, minlength: 1, maxlength: 10});
debuggerTab.addCheckbox(`debugUpdateProductionFiles`, `Update production files`, `Determines whether the job being debugged can update objects in production (<code>*PROD</code>) libraries.`, config.debugUpdateProductionFiles)
.addCheckbox(`debugEnableDebugTracing`, `Debug trace`, `Tells the debug service to send more data to the client. Only useful for debugging issues in the service. Not recommended for general debugging.`, config.debugEnableDebugTracing);

if (!isManaged()) {
Expand Down

0 comments on commit bc104d1

Please sign in to comment.