未验证 提交 5b5bb81e 编写于 作者: C Connor Peet

fix: inherit the compound root for all children of debug sessions

Fixes https://github.com/microsoft/vscode/issues/103705
上级 348a4ce2
......@@ -228,11 +228,13 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape, IDeb
public $startDebugging(folder: UriComponents | undefined, nameOrConfig: string | IDebugConfiguration, options: IStartDebuggingOptions): Promise<boolean> {
const folderUri = folder ? uri.revive(folder) : undefined;
const launch = this.debugService.getConfigurationManager().getLaunch(folderUri);
const parentSession = this.getSession(options.parentSessionID);
const debugOptions: IDebugSessionOptions = {
noDebug: options.noDebug,
parentSession: this.getSession(options.parentSessionID),
parentSession,
repl: options.repl,
compact: options.compact
compact: options.compact,
compoundRoot: parentSession?.compoundRoot
};
return this.debugService.startDebugging(launch, nameOrConfig, debugOptions).then(success => {
return success;
......
......@@ -36,6 +36,7 @@ import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle';
import { localize } from 'vs/nls';
import { canceled } from 'vs/base/common/errors';
import { filterExceptionsFromTelemetry } from 'vs/workbench/contrib/debug/common/debugUtils';
import { DebugCompoundRoot } from 'vs/workbench/contrib/debug/common/debugCompoundRoot';
export class DebugSession implements IDebugSession {
......@@ -133,6 +134,10 @@ export class DebugSession implements IDebugSession {
return !!this._options.compact;
}
get compoundRoot(): DebugCompoundRoot | undefined {
return this._options.compoundRoot;
}
setConfiguration(configuration: { resolved: IConfig, unresolved: IConfig | undefined }) {
this._configuration = configuration;
}
......
......@@ -169,6 +169,7 @@ export interface IDebugSession extends ITreeElement {
readonly parentSession: IDebugSession | undefined;
readonly subId: string | undefined;
readonly compact: boolean;
readonly compoundRoot: DebugCompoundRoot | undefined;
setSubId(subId: string | undefined): void;
......
......@@ -13,6 +13,7 @@ import Severity from 'vs/base/common/severity';
import { AbstractDebugAdapter } from 'vs/workbench/contrib/debug/common/abstractDebugAdapter';
import { DebugStorage } from 'vs/workbench/contrib/debug/common/debugStorage';
import { ExceptionBreakpoint, Expression, DataBreakpoint, FunctionBreakpoint, Breakpoint, DebugModel } from 'vs/workbench/contrib/debug/common/debugModel';
import { DebugCompoundRoot } from 'vs/workbench/contrib/debug/common/debugCompoundRoot';
export class MockDebugService implements IDebugService {
......@@ -135,6 +136,10 @@ export class MockDebugService implements IDebugService {
}
export class MockSession implements IDebugSession {
get compoundRoot(): DebugCompoundRoot | undefined {
return undefined;
}
stepInTargets(frameId: number): Promise<{ id: number; label: string; }[]> {
throw new Error('Method not implemented.');
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册