src/vs/workbench/contrib/debug/common/debugViewModel.ts/ViewModel/setFocus
class ViewModel:	setFocus(stackFrame: IStackFrame | undefined, thread: IThread | undefined, session: IDebugSession | undefined, explicit: boolean): void {
		const shouldEmitForStackFrame = this._focusedStackFrame !== stackFrame;
		const shouldEmitForSession = this._focusedSession !== session;

		this._focusedStackFrame = stackFrame;
		this._focusedThread = thread;
		this._focusedSession = session;

		this.contextKeyService.bufferChangeEvents(() => {
			this.loadedScriptsSupportedContextKey.set(session ? !!session.capabilities.supportsLoadedSourcesRequest : false);
			this.stepBackSupportedContextKey.set(session ? !!session.capabilities.supportsStepBack : false);
			this.restartFrameSupportedContextKey.set(session ? !!session.capabilities.supportsRestartFrame : false);
			this.stepIntoTargetsSupported.set(session ? !!session.capabilities.supportsStepInTargetsRequest : false);
			this.jumpToCursorSupported.set(session ? !!session.capabilities.supportsGotoTargetsRequest : false);
			this.setVariableSupported.set(session ? !!session.capabilities.supportsSetVariable : false);
			this.setExpressionSupported.set(session ? !!session.capabilities.supportsSetExpression : false);
			this.terminateDebuggeeSupported.set(session ? !!session.capabilities.supportTerminateDebuggee : false);
			this.suspendDebuggeeSupported.set(session ? !!session.capabilities.supportSuspendDebuggee : false);
			this.disassembleRequestSupported.set(!!session?.capabilities.supportsDisassembleRequest);
			this.focusedStackFrameHasInstructionPointerReference.set(!!stackFrame?.instructionPointerReference);
			const attach = !!session && isSessionAttach(session);
			this.focusedSessionIsAttach.set(attach);
		});

		if (shouldEmitForSession) {
			this._onDidFocusSession.fire(session);
		}
		if (shouldEmitForStackFrame) {
			this._onDidFocusStackFrame.fire({ stackFrame, explicit });
		}
	}