cdt-gdb-adapter
cdt-gdb-adapter copied to clipboard
Bring Debug Console to front at start of connection
You often don't get an obvious enough visual feedback that a debug session is launching. Especially if you are new to VS Code, it's easy to miss the debug control bar and the subtle progress thingies at the Run and Debug title.
Also, the Debug Console only comes up late during the connection process. If errors happen that make the solution wait for a timeout, e.g. if the GDB server fails during connection but after a successful spawn, then things look unresponsive.
One way to overcome this is to bring the Debug Console always to the front at the start of the connection. Then its logging of the connection process shows activity. We should explore to do this for the CDT GDB adapter. It could be done around the time that we launch the first child-process that logs to the console.
In our debug solution (where we built an extension pack which uses the off-the-shelf release of the CDT GDB adapter), we currently enable that behavior through a debug tracker. See https://github.com/Open-CMSIS-Pack/vscode-cmsis-debugger/blob/fdd0a99c436b8683a84ccb68dac1bbe3cde209f0/src/debug-configuration/gdbtarget-debug-tracker.ts#L36 But maybe this behavior is also of interest for others and would better live closer to the adapter implementation itself?