================ @@ -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> { ---------------- eronnen wrote:
Currently VS Code doesn't provide API to read the capability and there is no request to get it except for the `InitializeRequest`, so it will still be a backwards compatibility issue getting this capability... I ended up adding code to get the lldb version through `evaluate` command and enabling the symbols request only if it's 22 and up, WDYT? https://github.com/llvm/llvm-project/pull/153836 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits