Change:
Testing a js file at the root that something. a launch config to run it using node like: it and see the logs persist in the debug console.] to use alt+f2 to read it 'no debug session is active' !
is there a way to get the from an inactive session?
Reviewing the code some more I think the more reliable way to get the displayed session is to use . Currently it uses viewModel.focusedSession which won't include ended sessions as Andrea found
I think that will be a little involved, so deferring
<!-- UNABLETOLOCATECOMMITMESSAGE repo --Issue marked as unreleased but unable to locate closing commit in repo history. If this was closed in a separate repo you can add the label directly, or comment .
<!-- UNABLETOLOCATECOMMITMESSAGE --Issue marked as unreleased but unable to locate closing commit in issue timeline. You can manually reference a commit by commenting , or directly add the label if you know this has already been releaased

Discussion:
this.tree?.collapseAll(); } <ins> getDebugSession(): IDebugSession | undefined { return this.tree?.getInput(); } </ins> getReplInput(): CodeEditorWidget { return this.replInput; }

import { AccessibleViewProviderId, AccessibleViewType, IAccessibleViewContentProvider, IAccessibleViewService } from 'vs/platform/accessibility/browser/accessibleView'; import { AccessibilityVerbositySettingId } from 'vs/workbench/contrib/accessibility/browser/accessibilityConfiguration'; <del> import { IDebugService, IReplElement } from 'vs/workbench/contrib/debug/common/debug'; </del> <ins> import { IReplElement } from 'vs/workbench/contrib/debug/common/debug'; </ins> import { IAccessibleViewImplentation } from 'vs/platform/accessibility/browser/accessibleViewRegistry'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { getReplView, Repl } from 'vs/workbench/contrib/debug/browser/repl';

type: AccessibleViewType = AccessibleViewType.View; getProvider(accessor: ServicesAccessor) { const viewsService = accessor.get(IViewsService); <del> const debugService = accessor.get(IDebugService); </del> const accessibleViewService = accessor.get(IAccessibleViewService); const replView = getReplView(viewsService); if (!replView) { return undefined; } const focusedElement = replView.getFocusedElement(); <del> return new ReplOutputAccessibleViewProvider(replView, focusedElement, debugService, accessibleViewService); </del> <ins> return new ReplOutputAccessibleViewProvider(replView, focusedElement, accessibleViewService); </ins> } }

constructor( private readonly _replView: Repl, private readonly _focusedElement: IReplElement | undefined, <del> @IDebugService private readonly _debugService: IDebugService, </del> @IAccessibleViewService private readonly _accessibleViewService: IAccessibleViewService) { super(); this._treeHadFocus = !!_focusedElement; } public provideContent(): string { <del> const viewModel = this._debugService.getViewModel(); const focusedDebugSession = viewModel?.focusedSession; if (!focusedDebugSession) { return 'No debug session is active.'; </del> <ins> const debugSession = this._replView.getDebugSession(); if (!debugSession) { return 'No debug session available.'; </ins> } <del> const elements = focusedDebugSession.getReplElements(); </del> <ins> const elements = debugSession.getReplElements(); </ins> if (!elements.length) { return 'No output in the debug console.'; }