1.打开Tools下的Compiler Options 将Add the following commands when calling compiler 和Add these commands to the linker command line 选上 下面分别加上-g3
2. 把Settings 选项卡下的 Attemp to support some aspects of traditional C pre 的No修改为Yes
3. 在Programs 选项卡中将gcc 和g++ 后面加上(-D__DEBUG__) "D后面和DEBUG后面分别是两个连续的下划线__"
4.点击确定后按F8后,可调试F7 单步调试