src/vs/workbench/contrib/debug/common/debugUtils.ts/isSessionAttach
export function isSessionAttach(session: IDebugSession): boolean {
	return session.configuration.request === 'attach' && !getExtensionHostDebugSession(session) && (!session.parentSession || isSessionAttach(session.parentSession));
}