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

Method getAllUsedPorts

src/frontend/cortex_debug_session.ts:127–137  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

125 }
126
127 public static getAllUsedPorts(): number[] {
128 const ports = new Set<number>();
129 for (const s of CDebugSession.CurrentSessions) {
130 if ((s.status === 'started') || (s.status === 'stopped') || (s.status === 'running')) {
131 for (const p of s.usedPorts.values()) {
132 ports.add(p);
133 }
134 }
135 }
136 return Array.from(ports.values());
137 }
138
139 public addUsedPorts(ports: number[]) {
140 for (const p of ports) {

Callers 1

Calls 1

addMethod · 0.45

Tested by

no test coverage detected