[Lldb-commits] [lldb] [lldb-dap] Add process picker command to VS Code extension (PR #128943)
Adrian Vogelsgesang via lldb-commits
lldb-commits at lists.llvm.org
Tue Mar 11 13:52:44 PDT 2025
vogelsgesang wrote:
> should we also have feature flags for things like this in lldb-dap?
IMO, `lldb-dap` itself should exit with an error code in case of unsupported command line options. We might want to use a dedicated exit code for that, in order to differentiate it from other errors, where lldb-dap understands the command but execution fails for some other reason.
The VS-Code extension should be prepared to handle this exit code accordingly. For the process picker, it should probably display an error "Picking a process for attaching is not yet supported by this lldb-dap binary. Please upgrade to a newer lldb-dap binary.".
The error message is still slightly misleading, because at least for the next 6 months, i.e. until lldb-dap 21, there will not be any release of lldb-dap which is recent enough. But I think this is good still good enough, given that we still have relatively few users (as evident by comparing the download numbers of [lldb dap](https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.lldb-dap) against [vscode-lldb](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb) and [Microsofts C++ debugger](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools)). Long-term we might need a better compatibility story, though...
> In fact, I recently encountered an issue with the new lldb-dap.serverMode setting where enabling it caused the version of lldb-dap I have installed to hang since it doesn't actually support the --connection command line option.
We probably want to update the Typescript code to check if `lldb-dap` actually support the `--connection` parameter in the `onDidChangeConfiguration` event for the serverMode setting 🤔 WDYT, @ashgti? Is this something we should also track under #129283?
https://github.com/llvm/llvm-project/pull/128943
More information about the lldb-commits
mailing list