(
parentSession: Session<VSDebugSession>,
target: ITarget,
config: IPseudoAttachConfiguration,
)
| 93 | } |
| 94 | |
| 95 | public launch( |
| 96 | parentSession: Session<VSDebugSession>, |
| 97 | target: ITarget, |
| 98 | config: IPseudoAttachConfiguration, |
| 99 | ): void { |
| 100 | const childAttachConfig = { ...config, sessionId: target.id, __jsDebugChildServer: '' }; |
| 101 | const deferredConnection: IDeferred<DapConnection> = getDeferred(); |
| 102 | const session = new VSDebugSession( |
| 103 | target.id(), |
| 104 | target.name(), |
| 105 | deferredConnection.promise, |
| 106 | childAttachConfig, |
| 107 | ); |
| 108 | |
| 109 | this.sessionServer.createChildDebugServer(session, 0).then( |
| 110 | ({ server, connectionPromise }) => { |
| 111 | connectionPromise.then(x => deferredConnection.resolve(x)); |
| 112 | childAttachConfig.__jsDebugChildServer = ( |
| 113 | server.address() as net.AddressInfo |
| 114 | ).port.toString(); |
| 115 | |
| 116 | // Custom message currently not part of DAP |
| 117 | parentSession.connection._send({ |
| 118 | seq: 0, |
| 119 | command: 'attachedChildSession', |
| 120 | type: 'request', |
| 121 | arguments: { |
| 122 | config: childAttachConfig, |
| 123 | }, |
| 124 | }); |
| 125 | }, |
| 126 | ); |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | let debugServerPort: number | undefined = undefined; |
nothing calls this directly
no test coverage detected