How to stop GDB from executing “break main” by default in Eclipse?

后端 未结 2 1918
情书的邮戳
情书的邮戳 2020-12-10 11:33

I\'m working on a C project with Eclipse and MinGW. When running a debug build of this project, gdb always breaks on entering main(). I can see why this could b

相关标签:
2条回答
  • 2020-12-10 12:02

    Make sure you are in the c++ perspective, then go to menu Run -> Debug Configurations. Make sure your application is chosen in the left pane, press the Debugger tab, and uncheck Stop on startup at: checkbox.

    EDIT: you can see a screen-shot here: Method/Function Breakpoints in Eclipse CDT

    0 讨论(0)
  • 2020-12-10 12:13

    To set it for any new launch, On the menu Window->Preferences, Select C/C++->Debug->GDB item on the left, and then go to the Debug Configurations Defaults section and uncheck the "Stop at startup at:" checkbox on CDT 8.0 or later.

    You can see the details here: How do I prevent the debugger from stopping on the first line?

    0 讨论(0)
提交回复
热议问题