src/vs/workbench/contrib/debug/browser/callStackView.ts/SessionsRenderer/doRenderElement
class SessionsRenderer:	private doRenderElement(session: IDebugSession, matches: IMatch[], data: ISessionTemplateData): void {
		data.session.title = localize({ key: 'session', comment: ['Session is a noun'] }, "Session");
		data.label.set(session.getLabel(), matches);
		const stoppedDetails = session.getStoppedDetails();
		const thread = session.getAllThreads().find(t => t.stopped);

		const contextKeyService = this.contextKeyService.createOverlay(getSessionContextOverlay(session));
		const menu = data.elementDisposable.add(this.menuService.createMenu(MenuId.DebugCallStackContext, contextKeyService));

		const menuDisposables = data.elementDisposable.add(new DisposableStore());
		const setupActionBar = () => {
			menuDisposables.clear();
			data.actionBar.clear();

			const primary: IAction[] = [];
			const secondary: IAction[] = [];
			const result = { primary, secondary };

			menuDisposables.add(createAndFillInActionBarActions(menu, { arg: getContextForContributedActions(session), shouldForwardArgs: true }, result, 'inline'));
			data.actionBar.push(primary, { icon: true, label: false });
			// We need to set our internal context on the action bar, since our commands depend on that one
			// While the external context our extensions rely on
			data.actionBar.context = getContext(session);
		};
		data.elementDisposable.add(menu.onDidChange(() => setupActionBar()));
		setupActionBar();

		data.stateLabel.style.display = '';

		if (stoppedDetails) {
			data.stateLabel.textContent = stoppedDescription(stoppedDetails);
			data.session.title = `${session.getLabel()}: ${stoppedText(stoppedDetails)}`;
			data.stateLabel.classList.toggle('exception', stoppedDetails.reason === 'exception');
		} else if (thread && thread.stoppedDetails) {
			data.stateLabel.textContent = stoppedDescription(thread.stoppedDetails);
			data.session.title = `${session.getLabel()}: ${stoppedText(thread.stoppedDetails)}`;
			data.stateLabel.classList.toggle('exception', thread.stoppedDetails.reason === 'exception');
		} else {
			data.stateLabel.textContent = localize({ key: 'running', comment: ['indicates state'] }, "Running");
			data.stateLabel.classList.remove('exception');
		}
	}