* Session launcher which uses vscode's `startDebugging` method to start a new debug session * @param parentSession The parent debug session to pass to `startDebugging` * @param config Launch configuration for the new debug session
| 16 | * @param config Launch configuration for the new debug session |
| 17 | */ |
| 18 | class VsCodeSessionLauncher implements ISessionLauncher<vscode.DebugSession> { |
| 19 | launch( |
| 20 | parentSession: Session<vscode.DebugSession>, |
| 21 | target: ITarget, |
| 22 | config: IPseudoAttachConfiguration, |
| 23 | ) { |
| 24 | vscode.debug.startDebugging( |
| 25 | parentSession.debugSession.workspaceFolder, |
| 26 | { |
| 27 | ...config, |
| 28 | ...target.supplementalConfig, |
| 29 | serverReadyAction: parentSession.debugSession.configuration.serverReadyAction, |
| 30 | __parentId: parentSession.debugSession.id, |
| 31 | } as vscode.DebugConfiguration, |
| 32 | { |
| 33 | parentSession: parentSession.debugSession, |
| 34 | consoleMode: vscode.DebugConsoleMode.MergeWithParent, |
| 35 | noDebug: parentSession.debugSession.configuration.noDebug, |
| 36 | compact: parentSession instanceof RootSession, // don't compact workers/child processes |
| 37 | lifecycleManagedByParent: target.independentLifeycle ? false : true, |
| 38 | }, |
| 39 | ); |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | /** |
| 44 | * VS Code specific session manager which also implements the DebugAdapterDescriptorFactory |
nothing calls this directly
no outgoing calls
no test coverage detected