Open jprui opened 2 years ago
The referenced issue was about setting breakpoints at all, especially on connect, which was solved by adjusting the order of the connection and the optional, configurable "break at start".
In theory this extension could:
This seems similar to #292 but it doesn't seem like anything was ever done to allow vscode to plant breakpoints while the target is running.
If I try to plant a breakpoint while the target is running, there is a pop-up message saying:
After getting this message the breakpoint is not planted but it is listed in the breakpoints window and the source line gets a dot so vscode thinks the breakpoint is planted but it is not.
To avoid this inconsistency, the extension should either stop the target, set the breakpoint, continue the target or it should indicate to vscode that the breakpoint could not be planted.
A similar situation arises if you try to "Stop Debugging" while the target is running. In vscode, it thinks it has stopped debugging, but gdbserver is still running and it is in a weird state. If you do "Stop Debugging" when the target is not running, then vscode exits cleanly and so does gdbserver.
It is a royal pain to have to remember to manually stop the target before changing the state of the breakpoints or to stop debugging. Other debuggers like QtCreator can work with gdbserver and give the illusion that it can plant breakpoints while the target is running and it undoubtedly does a stop and continue behind the scenes since the gdbserver does not directly support setting breakpoints while the target is running.
Thanks.
launch.json
In my configuration, the localhost port of 10000 is actually an SSH tunnel from a linux system to a PC which forwards it to the actual target that is local to that PC. The vscode is running on the linux system and seems to have no problem connecting and debugging except for this inability to set breakpoints while the target is running.