Debug Transient State gets closed.
Bug description
I am trying to create a debug transient state to help me debug. When I start debugging and trigger the step over command, the menu reappears for a short menu but then disappears, leaving me outside of the transient menu.
To Reproduce
- Add a which key transient menu, like this:
"whichkey.transient": {
"debug": {
"title": "Debug transient",
"bindings": [
{
"key": "s",
"name": "Step over",
"icon": "debug-step-over",
"command": "workbench.action.debug.stepOver"
}
// [...]
- Start debugging and stop at a breakpoint
- Open the transient menu
- Press 's' to step over
Expected behavior
The menu should be active after the step over is completed.
Will take a look in a few weeks, I remembered I tried this a while back and something stopped me from using transient for the debug menu.
Tinkering with waiting additional delay after command execution or with ignoreFocusOut option of QuickPick API.
I think this is what's happening...
- Awaiting
workbench.action.debug.*only issue the command to LSP - which-key then display the QuickPick menu.
- LSP comes back and steals the focus; hence, closes the QuickPick menu.
A workaround is to add some delay to each command, but this is not that reliable as the delay is probably from the LSP.
I played around with this again trying to find a solution by tracking the DAP (not LSP when nitpicking!) state. While this kind of worked sometimes, I found a much better solution:
Setting the VSCode option debug.focusEditorOnBreak to false, should make the transient menu workas is in my initial tests!
Interesting found! Reopen this for future investigation and then if that works well maybe update the default binding and documentations