[Lldb-commits] [lldb] [lldb-dap] Add module symbol table viewer to VS Code extension #140626 (PR #153836)
John Harrison via lldb-commits
lldb-commits at lists.llvm.org
Fri Aug 15 15:27:52 PDT 2025
================
@@ -0,0 +1,185 @@
+import * as vscode from "vscode";
+import { DebugProtocol } from "@vscode/debugprotocol";
+
+import { DebugSessionTracker } from "../debug-session-tracker";
+import { DisposableContext } from "../disposable-context";
+
+import { DAPSymbolType } from "..";
+
+export class SymbolsProvider extends DisposableContext {
+ constructor(
+ private readonly tracker: DebugSessionTracker,
+ private readonly extensionContext: vscode.ExtensionContext,
+ ) {
+ super();
+
+ this.pushSubscription(vscode.commands.registerCommand(
+ "lldb-dap.debug.showSymbols",
+ () => {
+ this.SelectModuleAndShowSymbols();
+ },
+ ));
+
+ this.pushSubscription(vscode.commands.registerCommand(
+ "lldb-dap.modules.showSymbols",
+ (moduleItem: DebugProtocol.Module) => {
+ const session = vscode.debug.activeDebugSession;
+ if (!session) {
+ return;
+ }
+ this.showSymbolsForModule(session, moduleItem);
+ },
+ ));
+ }
+
+ static async doesServerSupportSymbolsRequest(session: vscode.DebugSession): Promise<boolean> {
----------------
ashgti wrote:
We could add a custom capability for this that we detect during initialization and then enable this feature dynamically.
https://github.com/llvm/llvm-project/pull/153836
More information about the lldb-commits
mailing list