如何通过 Mac 上 Eclipse CDT 中的调试器更改变量?
我意识到这可能是一个愚蠢的问题,但这对我来说非常令人沮丧,所以我无论如何都要问。
我正在遵循 Eclipse 帮助中的 C/C++ 开发用户指南。
我在C/C++开发用户指南->开始使用 ->调试项目
此时,我被告知以下内容:
在“变量”视图中,右键单击输入变量,然后选择“更改值...”,然后在单引号之间键入“m”,然后单击“确定”。
除此之外,没有更改值...
!这是对我来说的屏幕截图:
更改值在哪里... ?威士忌探戈狐步舞?!
This may be a dumb question, I realize, but this is quite frustrating for me right now so I'm going to ask anyway.
I'm following the C/C++ Development User Guide in the Eclipse help.
I'm at C/C++ Development User Guide -> Getting Started -> Debugging projects
At this point I am told the following:
In the Variables view, right-click the input variable, and select Change Value... and type 'm' between the single quotes and hit OK.
Except, there is no Change Value...
! Here is a screenshot of what it looks like for me:
Where is Change Value...
? Whiskey Tango Foxtrot?!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尽管遵循说明,您只需单击(单击左键)值框中的值即可。变量值列中显示的数据将进入编辑模式,以便您可以键入新值。
Despite the instructions you are following, you can simply click (single left click) on the value in the value box. The data shown in the variable's value column will go into edit mode so you can type your new value.
好吧,在经历了很多痛苦之后我想通了。
我已经安装了 XCode 3 提供的 gdb:
GNU gdb 6.3.50-20050815 (Apple version gdb-1515) (Sat Jan 15 08:33:48 UTC 2011)
似乎与Eclipse 和 Photran,也许还有我使用的任何版本的 GCC。
我的问题的解决方案是安装 fink gdb 包,即 GDB 7.1。
请注意,这是使用
fsf-gdb
调用的,以避免与 Apple Dev Tools GDB 发生冲突。因此,您需要更改 Eclipse 中的调试配置,以从
gdb
指向fsf-gdb
。希望这可以帮助那些碰巧想在 Mac 上使用 Photran 进行调试的可怜人。
Ok I figured things out after much pain.
I had installed the gdb provided by XCode 3:
GNU gdb 6.3.50-20050815 (Apple version gdb-1515) (Sat Jan 15 08:33:48 UTC 2011)
There appears to be better compatibility with Eclipse and Photran, and perhaps with whatever version of the GCC I was using.
The solution to my problem came about by installing the fink
gdb
package, which is GDB 7.1.Note that this is called with
fsf-gdb
to avoid a conflict with the Apple Dev Tools GDB.Thus, you're going to need to change your debug configuration in eclipse to point to
fsf-gdb
fromgdb
.May this help any other poor souls who happen to want to debug with Photran on a mac.