Search code examples
eclipseeclipse-cdt

Eclipse(CDT). Build+Terminate Current debug + Run after load on debug button is possible?


Is it possible to give any kind of directives/commands so that when I press "Debug" button in Eclipse IDE, it would terminate all active debug sessions, build changes and after program is loaded - run application without need for me to make any additional clicks/inputs? Thanks!


Solution

  • As @howlger said "Window > Preferences: Run/Debug > Launching: Terminate and Relaunch while launching" for part 1.

    To not have to press F8/resume, don't insert the breakpoint at main in the first place by disabling it in the Launch Configuration. From Run Menu -> Debug Configurations... -> Choose your launch -> Debug Tab, un check Stop on startup at.

    enter image description here

    You can change the default so newly created configurations have Stop on startup unchecked by going to Preferences -> C/C++ -> Debug -> GDB.

    enter image description here