Processes an incoming connection.
(info: ISessionInfo)
| 215 | |
| 216 | /** Processes an incoming connection. */ |
| 217 | public handleConnection(info: ISessionInfo) { |
| 218 | if (!('__pendingTargetId' in info.launchParams) || !info.launchParams.__pendingTargetId) { |
| 219 | throw new Error(`Incoming session is missing __pendingTargetId`); |
| 220 | } |
| 221 | |
| 222 | const targetId = info.launchParams.__pendingTargetId; |
| 223 | const session = this.sessions.get(targetId); |
| 224 | if (!session) { |
| 225 | throw new Error(`__pendingTargetId ${targetId} not found`); |
| 226 | } |
| 227 | |
| 228 | session.resolve(info); |
| 229 | } |
| 230 | } |
| 231 | |
| 232 | function startDebugServer(options: net.ListenOptions) { |
no test coverage detected