MCPcopy Index your code
hub / github.com/Marus/cortex-debug / NewSessionStarted

Method NewSessionStarted

src/frontend/cortex_debug_session.ts:110–125  ·  view source on GitHub ↗
(session: vscode.DebugSession)

Source from the content-addressed store, hash-verified

108
109 // Call this method after session actually started. It inserts new session into the session tree
110 public static NewSessionStarted(session: vscode.DebugSession): CDebugSession {
111 const newSession = CDebugSession.GetSession(session); // May have already in the global list
112 newSession.status = 'started';
113 if (session.parentSession && (session.parentSession.type === 'cortex-debug')) {
114 const parent = CDebugSession.FindSession(session.parentSession);
115 if (!parent) {
116 vscode.window.showErrorMessage(
117 `Internal Error: Have parent for new session, Parent = ${session.parentSession.name} but can't find it`);
118 } else {
119 parent.add(newSession); // Insert into tree
120 }
121 } else {
122 CDebugSession.ROOT.add(newSession);
123 }
124 return newSession;
125 }
126
127 public static getAllUsedPorts(): number[] {
128 const ports = new Set<number>();

Callers 1

debugSessionStartedMethod · 0.80

Calls 3

GetSessionMethod · 0.80
FindSessionMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected