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

Method spawnRunDaemon

src/debug/web_debug_impl.ts:273–310  ·  view source on GitHub ↗
(args: DartLaunchArgs, logger: Logger)

Source from the content-addressed store, hash-verified

271 }
272
273 protected spawnRunDaemon(args: DartLaunchArgs, logger: Logger): WebRun {
274 let allArgs: string[] = ["global", "run", "webdev", "daemon"];
275
276 // if (this.shouldConnectDebugger) {
277 // appArgs.push("--start-paused");
278 // }
279 // }
280
281 if (args.toolArgs)
282 allArgs = allArgs.concat(args.toolArgs);
283
284 const pubExecution = getPubExecutionInfo(
285 args.dartSdkPath,
286 allArgs,
287 );
288
289 const customTool = {
290 replacesArgs: args.customToolReplacesArgs,
291 script: args.customTool,
292 };
293 let execution = usingCustomScript(
294 pubExecution.executable,
295 pubExecution.args,
296 customTool,
297 );
298 allArgs = execution.args;
299
300 if (args.args)
301 allArgs = allArgs.concat(args.args);
302
303 execution = {
304 args: allArgs,
305 executable: execution.executable,
306 };
307
308 // TODO: Attach?
309 return new WebRun(execution, args.cwd, { envOverrides: args.env, toolEnv: this.toolEnv }, args.webDaemonLogFile, logger, (url) => this.exposeUrl(url), this.maxLogLineLength);
310 }
311}

Callers 1

spawnProcessMethod · 0.95

Calls 3

getPubExecutionInfoFunction · 0.90
usingCustomScriptFunction · 0.90
exposeUrlMethod · 0.80

Tested by

no test coverage detected