src/vs/workbench/contrib/debug/browser/debugToolBar.ts/createDisconnectMenuItemAction
export function createDisconnectMenuItemAction(action: MenuItemAction, disposables: DisposableStore, accessor: ServicesAccessor): IActionViewItem | undefined {
	const menuService = accessor.get(IMenuService);
	const contextKeyService = accessor.get(IContextKeyService);
	const keybindingService = accessor.get(IKeybindingService);
	const instantiationService = accessor.get(IInstantiationService);
	const contextMenuService = accessor.get(IContextMenuService);

	const menu = menuService.createMenu(MenuId.DebugToolBarStop, contextKeyService);
	const secondary: IAction[] = [];
	disposables.add(createAndFillInActionBarActions(menu, { shouldForwardArgs: true }, secondary));

	if (!secondary.length) {
		return undefined;
	}

	const dropdownAction = disposables.add(new Action('notebook.moreRunActions', localize('notebook.moreRunActionsLabel', "More..."), 'codicon-chevron-down', true));
	const keybindingProvider = (action: IAction) => keybindingService.lookupKeybinding(action.id, contextKeyService);
	const item = instantiationService.createInstance(DropdownWithPrimaryActionViewItem,
		action as MenuItemAction,
		dropdownAction,
		secondary,
		'debug-stop-actions',
		contextMenuService,
		{
			getKeyBinding: keybindingProvider
		});
	return item;
}