================ @@ -70,9 +71,21 @@ export class DebugSessionTracker /** Clear information from the active session. */ private onExit(session: vscode.DebugSession) { this.modules.delete(session); + // close when there is no more sessions + if (this.modules.size <= 0) { + this.showModulesTreeView(false); + } this.modulesChanged.fire(); } + private showModulesTreeView(showModules: boolean) { + vscode.commands.executeCommand( + "setContext", + "lldb-dap.showModules", + showModules, + ); ---------------- ashgti wrote:
This will set the context globally, however the we should be checking the active debug session and updating this value. Otherwise this UI will show the list for any debug session with modules, not the active one. We can add a listener for `vscode.debug.onDidChangeActiveDebugSession` to update this value and our module tracker is tracking by session, so we can use the session to track which modules are associated with the active session. That or the we should move this logic into the `ModulesDataProvider` which is checking the `vscode.debug.activeDebugSession` already. https://github.com/llvm/llvm-project/pull/140603 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits