[Lldb-commits] [lldb] [lldb-dap] Implement command directives (PR #74808)
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Mon Dec 11 17:34:45 PST 2023
clayborg wrote:
> > "error: one of your required 'attachCommands' failed, check the debug console for details"
>
> This is a key thing that I didn't consider in the beginning. I'm going to update this patch to only support `?`, and then I'll make another one for `!`, because I need to explore how to send visible notifications to the IDE.
I will happily ok this if we can just return a pertinent error for at least `attach` and `launch`. We run these from both `attach` and `launch`:
- `initCommands`
- `preRunCommands`
- `attachCommands` or `launchCommands`
- `postRunCommands`
Outside of this we have `exitCommands` and `terminateCommands` which happend outside of this and we could either outlaw the use of `!` commands here (since the session will shut down soon anyway, so better to let it shutdown correctly. Then we have `stopCommands`. So my suggestion would be:
- Lets return an error with an error message of "failed to run 'XXXCommands', see debug console for details for launch and attach
- Outlaw `!` commands for any places that don't have a command where we can return an error. This would be easy to document in the package.json.
https://github.com/llvm/llvm-project/pull/74808
More information about the lldb-commits
mailing list