Skip to content

Commit b224ca5

Browse files
authored
Message info for debug action on git and binary components (#1569)
1 parent ee33735 commit b224ca5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/openshift/component.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,12 @@ export class Component extends OpenShiftItem {
622622
)
623623
static async debug(component: OpenShiftObject): Promise<string | null> {
624624
if (!component) return null;
625-
return Progress.execFunctionWithProgress(`Starting debugger session for the component '${component.getName()}'.`, () => Component.startDebugger(component));
625+
if (component.compType === ComponentType.LOCAL) {
626+
return Progress.execFunctionWithProgress(`Starting debugger session for the component '${component.getName()}'.`, () => Component.startDebugger(component));
627+
}
628+
if (component.compType !== ComponentType.GIT || ComponentType.BINARY) {
629+
throw new VsCommandError(`You are trying to run Debug on a ${component.compType} component, which is NOT supported. Debug Command is only supported for Local components.`);
630+
}
626631
}
627632

628633
static async startDebugger(component: OpenShiftObject): Promise<string | undefined> {

0 commit comments

Comments
 (0)