src/vs/workbench/contrib/debug/browser/debugSessionPicker.ts/_getPicksAndActiveItem
function _getPicksAndActiveItem(filter: string, selectAndStartID: string, debugService: IDebugService, viewsService: IViewsService, commandService: ICommandService): { picks: Array<IPickerDebugItem | IQuickPickSeparator>; activeItems: Array<IPickerDebugItem> } {
	const debugConsolePicks: Array<IPickerDebugItem | IQuickPickSeparator> = [];
	const headerSessions: IDebugSession[] = [];

	const currSession = debugService.getViewModel().focusedSession;
	const sessions = debugService.getModel().getSessions(false);
	const activeItems: Array<IPickerDebugItem> = [];

	sessions.forEach((session) => {
		if (session.compact && session.parentSession) {
			headerSessions.push(session.parentSession);
		}
	});

	sessions.forEach((session) => {
		const isHeader = headerSessions.includes(session);
		if (!session.parentSession) {
			debugConsolePicks.push({ type: 'separator', label: isHeader ? session.name : undefined });
		}

		if (!isHeader) {
			const pick = _createPick(session, filter, debugService, viewsService, commandService);
			if (pick) {
				debugConsolePicks.push(pick);
				if (session.getId() === currSession?.getId()) {
					activeItems.push(pick);
				}
			}
		}
	});

	if (debugConsolePicks.length) {
		debugConsolePicks.push({ type: 'separator' });
	}

	const createDebugSessionLabel = nls.localize('workbench.action.debug.startDebug', 'Start a New Debug Session');
	debugConsolePicks.push({
		label: `$(plus) ${createDebugSessionLabel}`,
		ariaLabel: createDebugSessionLabel,
		accept: () => commandService.executeCommand(selectAndStartID)
	});

	return { picks: debugConsolePicks, activeItems };
}