diff --git a/src/tsconfig.strictNullChecks.json b/src/tsconfig.strictNullChecks.json index 23c1332397f0bdc0376cc0719d8b2adc4b9cddb1..e8eea983c9f516a304eb1808b5e7bf284177a192 100644 --- a/src/tsconfig.strictNullChecks.json +++ b/src/tsconfig.strictNullChecks.json @@ -33,6 +33,7 @@ "./vs/workbench/services/timer/**/*.ts", "./vs/workbench/contrib/webview/**/*.ts", "./vs/workbench/contrib/debug/common/**/*.ts", + "./vs/workbench/contrib/debug/node/**/*.ts", "./vs/workbench/contrib/preferences/common/**/*.ts", "./vs/workbench/contrib/preferences/**/settings*.ts", "./vs/workbench/contrib/terminal/**/*" @@ -239,18 +240,9 @@ "./vs/workbench/contrib/debug/browser/debugStatus.ts", "./vs/workbench/contrib/debug/browser/exceptionWidget.ts", "./vs/workbench/contrib/debug/browser/linkDetector.ts", + "./vs/workbench/contrib/debug/browser/baseDebugView.ts", "./vs/workbench/contrib/debug/browser/statusbarColorProvider.ts", - "./vs/workbench/contrib/debug/common/debug.ts", - "./vs/workbench/contrib/debug/common/debugProtocol.d.ts", - "./vs/workbench/contrib/debug/common/debugSchemas.ts", - "./vs/workbench/contrib/debug/common/debugSource.ts", - "./vs/workbench/contrib/debug/common/debugUtils.ts", - "./vs/workbench/contrib/debug/common/debugViewModel.ts", "./vs/workbench/contrib/debug/electron-browser/rawDebugSession.ts", - "./vs/workbench/contrib/debug/node/debugAdapter.ts", - "./vs/workbench/contrib/debug/node/debugger.ts", - "./vs/workbench/contrib/debug/node/telemetryApp.ts", - "./vs/workbench/contrib/debug/node/terminals.ts", "./vs/workbench/contrib/debug/test/common/debugSource.test.ts", "./vs/workbench/contrib/debug/test/common/debugUtils.test.ts", "./vs/workbench/contrib/debug/test/common/mockDebug.ts", diff --git a/src/vs/workbench/contrib/debug/common/debug.ts b/src/vs/workbench/contrib/debug/common/debug.ts index 000458a22fc3ca43a985e2a48c9f19f4bb5cb8c5..c6e4b73f1f0ad3856d28fe5f8c22811516780ea3 100644 --- a/src/vs/workbench/contrib/debug/common/debug.ts +++ b/src/vs/workbench/contrib/debug/common/debug.ts @@ -356,30 +356,30 @@ export interface IExceptionInfo { export interface IViewModel extends ITreeElement { /** - * Returns the focused debug session or null if no session is stopped. + * Returns the focused debug session or undefined if no session is stopped. */ - readonly focusedSession: IDebugSession; + readonly focusedSession: IDebugSession | undefined; /** - * Returns the focused thread or null if no thread is stopped. + * Returns the focused thread or undefined if no thread is stopped. */ - readonly focusedThread: IThread; + readonly focusedThread: IThread | undefined; /** - * Returns the focused stack frame or null if there are no stack frames. + * Returns the focused stack frame or undefined if there are no stack frames. */ - readonly focusedStackFrame: IStackFrame; + readonly focusedStackFrame: IStackFrame | undefined; - getSelectedExpression(): IExpression; - getSelectedFunctionBreakpoint(): IFunctionBreakpoint; - setSelectedExpression(expression: IExpression): void; - setSelectedFunctionBreakpoint(functionBreakpoint: IFunctionBreakpoint): void; + getSelectedExpression(): IExpression | undefined; + getSelectedFunctionBreakpoint(): IFunctionBreakpoint | undefined; + setSelectedExpression(expression: IExpression | undefined): void; + setSelectedFunctionBreakpoint(functionBreakpoint: IFunctionBreakpoint | undefined): void; isMultiSessionView(): boolean; onDidFocusSession: Event; - onDidFocusStackFrame: Event<{ stackFrame: IStackFrame, explicit: boolean }>; - onDidSelectExpression: Event; + onDidFocusStackFrame: Event<{ stackFrame: IStackFrame | undefined, explicit: boolean }>; + onDidSelectExpression: Event; } export interface IEvaluate { diff --git a/src/vs/workbench/contrib/debug/common/debugViewModel.ts b/src/vs/workbench/contrib/debug/common/debugViewModel.ts index 8296124dfb916db91b5820852c7201dbeb3de8df..9f0eb34aca631d568b8304ef4e17f6b40ee6ca66 100644 --- a/src/vs/workbench/contrib/debug/common/debugViewModel.ts +++ b/src/vs/workbench/contrib/debug/common/debugViewModel.ts @@ -11,14 +11,14 @@ export class ViewModel implements IViewModel { firstSessionStart = true; - private _focusedStackFrame: IStackFrame; - private _focusedSession: IDebugSession; - private _focusedThread: IThread; - private selectedExpression: IExpression; - private selectedFunctionBreakpoint: IFunctionBreakpoint; + private _focusedStackFrame: IStackFrame | undefined; + private _focusedSession: IDebugSession | undefined; + private _focusedThread: IThread | undefined; + private selectedExpression: IExpression | undefined; + private selectedFunctionBreakpoint: IFunctionBreakpoint | undefined; private readonly _onDidFocusSession: Emitter; - private readonly _onDidFocusStackFrame: Emitter<{ stackFrame: IStackFrame, explicit: boolean }>; - private readonly _onDidSelectExpression: Emitter; + private readonly _onDidFocusStackFrame: Emitter<{ stackFrame: IStackFrame | undefined, explicit: boolean }>; + private readonly _onDidSelectExpression: Emitter; private multiSessionView: boolean; private expressionSelectedContextKey: IContextKey; private breakpointSelectedContextKey: IContextKey; @@ -38,19 +38,19 @@ export class ViewModel implements IViewModel { return 'root'; } - get focusedSession(): IDebugSession { + get focusedSession(): IDebugSession | undefined { return this._focusedSession; } - get focusedThread(): IThread { + get focusedThread(): IThread | undefined { return this._focusedThread; } - get focusedStackFrame(): IStackFrame { + get focusedStackFrame(): IStackFrame | undefined { return this._focusedStackFrame; } - setFocus(stackFrame: IStackFrame, thread: IThread, session: IDebugSession, explicit: boolean): void { + setFocus(stackFrame: IStackFrame | undefined, thread: IThread | undefined, session: IDebugSession | undefined, explicit: boolean): void { const shouldEmitForStackFrame = this._focusedStackFrame !== stackFrame; const shouldEmitForSession = this._focusedSession !== session; @@ -72,29 +72,29 @@ export class ViewModel implements IViewModel { return this._onDidFocusSession.event; } - get onDidFocusStackFrame(): Event<{ stackFrame: IStackFrame, explicit: boolean }> { + get onDidFocusStackFrame(): Event<{ stackFrame: IStackFrame | undefined, explicit: boolean }> { return this._onDidFocusStackFrame.event; } - getSelectedExpression(): IExpression { + getSelectedExpression(): IExpression | undefined { return this.selectedExpression; } - setSelectedExpression(expression: IExpression) { + setSelectedExpression(expression: IExpression | undefined) { this.selectedExpression = expression; this.expressionSelectedContextKey.set(!!expression); this._onDidSelectExpression.fire(expression); } - get onDidSelectExpression(): Event { + get onDidSelectExpression(): Event { return this._onDidSelectExpression.event; } - getSelectedFunctionBreakpoint(): IFunctionBreakpoint { + getSelectedFunctionBreakpoint(): IFunctionBreakpoint | undefined { return this.selectedFunctionBreakpoint; } - setSelectedFunctionBreakpoint(functionBreakpoint: IFunctionBreakpoint): void { + setSelectedFunctionBreakpoint(functionBreakpoint: IFunctionBreakpoint | undefined): void { this.selectedFunctionBreakpoint = functionBreakpoint; this.breakpointSelectedContextKey.set(!!functionBreakpoint); }