MCPcopy Create free account
hub / github.com/Dart-Code/Dart-Code / startDebugger

Function startDebugger

src/test/debug_helpers.ts:19–32  ·  view source on GitHub ↗
(dc: DartDebugClient, script?: Uri | string, extraConfiguration?: Record<string, any>)

Source from the content-addressed store, hash-verified

17export const flutterTestDeviceIsWeb = flutterTestDeviceId === "chrome" || flutterTestDeviceId === "web-server";
18
19export async function startDebugger(dc: DartDebugClient, script?: Uri | string, extraConfiguration?: Record<string, any>): Promise<DebugConfiguration & DartVsCodeLaunchArgs & DebugProtocol.LaunchRequestArguments> {
20 if (dc.debuggerType === DebuggerType.Flutter || dc.debuggerType === DebuggerType.FlutterTest) {
21 extraConfiguration = Object.assign(
22 { deviceId: flutterTestDeviceId },
23 extraConfiguration,
24 );
25 }
26 const config = await getLaunchConfiguration(script, extraConfiguration);
27 if (!config)
28 throw new Error(`Could not get launch configuration (got ${config})`);
29
30 await watchPromise("startDebugger->start", dc.start());
31 return config satisfies DebugConfiguration & DartVsCodeLaunchArgs & DebugProtocol.LaunchRequestArguments;
32}
33
34export function createDebugClient(debuggerType: DebuggerType) {
35 const descriptor = privateApi.debugAdapterDescriptorFactory.descriptorForType(debuggerType);

Calls 3

getLaunchConfigurationFunction · 0.90
watchPromiseFunction · 0.90
startMethod · 0.45

Tested by 4

runTestsFunction · 0.72
runWithoutDebuggingFunction · 0.72
testBreakpointConditionFunction · 0.72
testBreakpointConditionFunction · 0.72