如何从执行&QUOT停止GDB;打破主"默认情况下,在Eclipse? [英] How to stop GDB from executing "break main" by default in Eclipse?

查看:200
本文介绍了如何从执行&QUOT停止GDB;打破主"默认情况下,在Eclipse?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的工作与Eclipse和MinGW一个C项目。当运行这个项目的调试版本,GDB总是打破在进入的main()。我可以看到,为什么这可能是有用的,但对于我目前的项目,我不希望这样的事情发生。

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 be useful, but for my current project I don't want that to happen.

我读过,有一个命令

(gdb) break main

在命令行中运行时,将完成同样的行为。

which will accomplish the same behavior when running from the command line.

目前,我没有一个.gdbinit文件。

At the moment I do NOT have a .gdbinit file.

目前,从Eclipse中运行时GDB不会停止从命令行中运行时进入主力,但它的作用。

At the moment gdb doesn't stop on entering main when running from the command line, but it does when running from Eclipse.

如何使GDB停止打破在Eclipse中默认进入主?

How do I make GDB stop breaking on entering main by default within Eclipse?

推荐答案

请确保你是在c ++的角度看,然后进入菜单运行 - > 调试配置。请确保您的应用程序选择在左窗格中,preSS的调试标签,取消选中在启动时停止:复选框。

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.

编辑:你可以看到一个屏幕截图在这里:<一href=\"http://stackoverflow.com/questions/4119066/method-function-breakpoints-in-eclipse-cdt/4177895#4177895\">Method/Function在Eclipse CDT断点

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

这篇关于如何从执行&QUOT停止GDB;打破主&QUOT;默认情况下,在Eclipse?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆