diff --git a/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts b/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts index 95e12911dcfe52bad2cdc68ad2a7e867c86d2057..72c5ac93ee9cf0006dfa6cc9783c39da7aba36a5 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts @@ -356,8 +356,13 @@ export class DebugEditorContribution implements IDebugEditorContribution { // Toggles exception widget based on the state of the current editor model and debug stack frame const model = this.editor.getModel(); const focusedSf = this.debugService.getViewModel().focusedStackFrame; - const callStack = focusedSf ? focusedSf.thread.getCallStack() : null; - if (!model || !focusedSf || !callStack || callStack.length === 0) { + if (!model || !focusedSf || !focusedSf.source || !focusedSf.source.available) { + this.closeExceptionWidget(); + return; + } + + const callStack = focusedSf.thread.getCallStack(); + if (!callStack || callStack.length === 0) { this.closeExceptionWidget(); return; }