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

Method stopTarget

valdi/vscode_debugger/src/binder.ts:417–430  ·  view source on GitHub ↗

* Called when we get a terminate for a target. We stop the * specific target if we can, otherwise we just tear down the session.

(target: ITarget, container: Container)

Source from the content-addressed store, hash-verified

415 * specific target if we can, otherwise we just tear down the session.
416 */
417 private stopTarget(target: ITarget, container: Container) {
418 container.get<ITelemetryReporter>(ITelemetryReporter).flush();
419 if (!this.targetList().includes(target)) {
420 return Promise.resolve({});
421 }
422
423 if (target.canStop()) {
424 target.stop();
425 } else {
426 this._disconnect();
427 }
428
429 return Promise.resolve({});
430 }
431
432 private _attachToNewTargets(targets: ITarget[], launcher: ILauncher) {
433 for (const target of targets.values()) {

Callers 1

attachMethod · 0.95

Calls 7

targetListMethod · 0.95
_disconnectMethod · 0.95
flushMethod · 0.65
getMethod · 0.65
resolveMethod · 0.65
canStopMethod · 0.65
stopMethod · 0.65

Tested by

no test coverage detected