eclipse-cdt-cloud / cdt-gdb-adapter

CDT GDB Debug Adapter
Eclipse Public License 2.0
28 stars 40 forks source link

break at main option when launching #250

Open jonahgraham opened 1 year ago

jonahgraham commented 1 year ago

CDT (Eclipse IDE version) has a "break at main" (with a configurable symbol) option. GDB itself has a start method that will do that functionality automatically and can be accessed via MI with -exec-run --start.

This is a feature request to add that.

In the meantime the workaround is "initCommands": ["tbreak main"] for launch scenario.

GitMensch commented 1 year ago

To mimic the CDT option I'd suggest a dual setting (can be boolean or string): stopAtEntry (that's actually what native.debug has) or breakAtMain (to swap over the old label). if true -> run with --start, if false (possibly the default) without, if a string: issue -break-insert -t $entry.