-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: have an xcdebug
equivalent for lldb-dap
#125777
Comments
I am having a similar, terminal-focused workflow. The user-facing flow is:
Under the hood, it works by:
This vscode-URL will focus the most recently used VSCode window. The CodeLLDB extension is handling the The provided ad-hoc config contains See this documentation for the URL schemes supported by CodeLLDB. If we want to enable the same workflow also in |
If you are trying to debug locally you might also be able to directly pass the For debugging remotely (via SSH or within a container), this workflow used to be broken in the past (see microsoft/vscode-remote-release#4260), but this might have been fixed recently (see microsoft/vscode@521c6bc). |
This commit adds support for starting debug sessions through special `vscode://llvm-vs-code-extensions.lldb-dap/launch/config?config={launch-config}` URIs. This allows tighter integration with custom scripts. One potential use case is providing similar functionality to `xcdebug`, see llvm#125777 for some discussion on that use case. The functionality was inspired by @vadimcn's CodeLLDB extension, which [provides similar functionality](https://github.com/vadimcn/codelldb/blob/master/MANUAL.md#debugging-externally-launched-code).
With the recent PR adding basic URL support, do we maybe want to integrate the script's functionality natively into one of LLDB's tools? E.g., we could add an Also, personally I would love to keep stdin/stdout/stderr in the original |
Doing that in the debug stub seems like the wrong place. I originally suggested doing this in lldb-dap because it should already know how to do a reverse connect for running your binary in the terminal. I was hoping we could reuse some of that logic. |
I must have missed that suggestion. I interpreted your "I’m not sure this would really fit within lldb-dap" in the first comment as a suggestion against doing this in lldb-dap. Did I misinterpret that? Or did I miss some other communication in the meantime (Discourcse, other Github issues, ...)?
Not sure which exact logic you are referring to. Could you point me to a source code file / function you had in mind? |
This commit adds support for starting debug sessions through special `vscode://llvm-vs-code-extensions.lldb-dap/start?config={launch-config}` URIs. This allows tighter integration with custom scripts. One potential use case is providing similar functionality to `xcdebug`, see #125777 for some discussion on that use case. The functionality was inspired by @vadimcn's CodeLLDB extension, which [provides similar functionality](https://github.com/vadimcn/codelldb/blob/master/MANUAL.md#debugging-externally-launched-code).
This commit adds support for starting debug sessions through special `vscode://llvm-vs-code-extensions.lldb-dap/start?config={launch-config}` URIs. This allows tighter integration with custom scripts. One potential use case is providing similar functionality to `xcdebug`, see llvm#125777 for some discussion on that use case. The functionality was inspired by @vadimcn's CodeLLDB extension, which [provides similar functionality](https://github.com/vadimcn/codelldb/blob/master/MANUAL.md#debugging-externally-launched-code).
On macOS, xcdebug allows you to start a debug session in Xcode from the command line:
I work almost exclusively in the terminal, but I’d love to take advantage of an IDE for debugging. I wish there were something similar for lldb-dap and VS Code. However, I’m not sure this would really fit within lldb-dap, as the DAP implementation is, by design, agnostic of the IDE or editor that uses it. For this to work, the binary (whether lldb-dap or something else) would need to know which program to launch and how.
The text was updated successfully, but these errors were encountered: