摘要: 在代码中直接调用DebugBreak()函数,可以使程序中断运行,和在IDE中设置断点中断运行的道理是一样的。用这种方式,一些情况下比打断点更方便调试,如下,在test()函数返回0时激活断点#include "debugapi.h"int test(int x){ if (x > 0) return 1; return 0;}int _tmain(int argc, _TCHAR* argv[]){ if (test(-1) == 0) { DebugBreak(); } return 0;}有时编译时编译器会报一个"No Target Architect 阅读全文
posted @ 2013-09-20 23:52 linear 阅读(882) 评论(0) 推荐(0) 编辑