add launch attribute stopOnEntry (start instead of run / implicit break on attach)
The stopOnEntry
is noted in the vscode debugging docs as "break immediately when the program launches".
To support that change Adjust https://gitlab.cobolworx.com/COBOLworx/cbl-gdb-vsextension/-/blob/bobdev/CblGdbExt/CblGdb/src/backend/mi2/mi2.ts#L625 to do exec-run --start
https://sourceware.org/gdb/current/onlinedocs/gdb/GDB_002fMI-Program-Execution.html#GDB_002fMI-Program-Execution and likely invoke cstart
(as shipped in cobcd.py 4.2.2) then to actually stop at the first program's first statement.
Note: the COBOL devs I've spoken commonly want the program to start and hold at the first COBOL line, implementing this as noted above should provide a clean way to do so.
The implementation above should work fine with Launch
configurations, for Attach
an implicit exec-stop
(to "break" wherever the program is), and then ideally switching to the most current COBOL frame would be the way to go.