MCPcopy
hub / github.com/microsoft/vscode-js-debug / getTargetSession

Method getTargetSession

src/ui/diagnosticsUI.ts:88–104  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

86 }
87
88 private getTargetSession() {
89 const active = vscode.debug.activeDebugSession;
90 if (!active || !isDebugType(active?.type)) {
91 return this.pickSession();
92 }
93
94 if (DebugSessionTracker.isConcreteSession(active)) {
95 return active;
96 }
97
98 const children = this.tracker.getChildren(active);
99 if (children.length === 1) {
100 return children[0];
101 }
102
103 return this.pickSession();
104 }
105
106 private pickSession() {
107 return DebugSessionTracker.pickSession(

Callers 1

registerMethod · 0.95

Calls 4

pickSessionMethod · 0.95
isDebugTypeFunction · 0.90
isConcreteSessionMethod · 0.80
getChildrenMethod · 0.65

Tested by

no test coverage detected