MCPcopy Create free account
hub / github.com/Snapchat/Valdi / createThread

Method createThread

valdi/vscode_debugger/src/adapter/debugAdapter.ts:255–289  ·  view source on GitHub ↗
(cdp: Cdp.Api, delegate: IThreadDelegate)

Source from the content-addressed store, hash-verified

253 }
254
255 createThread(cdp: Cdp.Api, delegate: IThreadDelegate): Thread {
256 this._thread = new Thread(
257 this.sourceContainer,
258 cdp,
259 this.dap,
260 delegate,
261 this._services.get(ILogger),
262 this._services.get(IEvaluator),
263 this._services.get(ICompletions),
264 this.launchConfig,
265 this.breakpointManager,
266 );
267
268 const profile = this._services.get<IProfileController>(IProfileController);
269 profile.connect(this.dap, this._thread);
270 if ('profileStartup' in this.launchConfig && this.launchConfig.profileStartup) {
271 profile.start(this.dap, this._thread, { type: BasicCpuProfiler.type });
272 }
273
274 for (const breakpoint of this._customBreakpoints)
275 this._thread.updateCustomBreakpoint(breakpoint, true);
276
277 this.asyncStackPolicy
278 .connect(cdp)
279 .then(d => this._disposables.push(d))
280 .catch(err =>
281 this._services
282 .get<ILogger>(ILogger)
283 .error(LogTag.Internal, 'Error enabling async stacks', err),
284 );
285
286 this._thread.setPauseOnExceptionsState(this._pauseOnExceptionsState);
287 this.breakpointManager.setThread(this._thread);
288 return this._thread;
289 }
290
291 async enableCustomBreakpoints(
292 params: Dap.EnableCustomBreakpointsParams,

Callers 1

attachMethod · 0.95

Calls 9

setThreadMethod · 0.80
getMethod · 0.65
connectMethod · 0.65
startMethod · 0.65
thenMethod · 0.65
errorMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected