codelldb icon indicating copy to clipboard operation
codelldb copied to clipboard

Optimize restart times by supporting RestartRequest natively

Open mam-ableton opened this issue 3 years ago • 1 comments

From what I can see, vscode-lldb doesn't support the RestartRequest in the Debugger Adapter Protocol.

My assumption then is that hitting the restart button in VSCode falls back to the emulation described in the docs:

If the capability is missing or has the value false, a typical client will emulate 'restart' by terminating the debug adapter first and then launching it anew. https://microsoft.github.io/debug-adapter-protocol/specification

This works, but is a bit slow because lldb needs to fully relaunch itself, loading the binary and libraries in the process.

However, lldb natively supports efficient restarts that are much faster, since libraries are skipped: https://stackoverflow.com/questions/58125753/how-to-preserve-lldb-session-between-builds. This is what happens when the run command is re-executed within an existing lldb debug session.

Can vscode-lldb implement a RestartRequest handler that restarts an existing lldb session, rather than creating a new one ? That would greatly improve the restart user experience – from my testing on the CLI, restarting is several times faster on the cli than in vscode-lldb

thanks!

mam-ableton avatar Nov 19 '21 17:11 mam-ableton

This is essentially the same request as #531. As I said there, at the moment I don't have the time to work on any new features. For now, you can the workaround mentioned in that issue.

vadimcn avatar Nov 19 '21 21:11 vadimcn