Xcode Debugger:为什么只显示汇编程序? [英] Xcode Debugger: Why is it only showing me assembler?

查看:32
本文介绍了Xcode Debugger:为什么只显示汇编程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始在 Xcode 中进行 Cocoa 开发,做 hello world 示例.我已经到了运行时调试",即

I'm just starting out with Cocoa development in Xcode, doing the hello world example. I'm up to step 6 of the section "runtime debugging", which is

使用调试器工具栏中的 Step Over 按钮,开始逐步执​​行代码.随着每一行代码的执行,您可以检查程序的状态.变量的值有时用红色绘制,表示该值在最后一步中被修改.请注意,调试器在执行指定的行之前暂停.每次暂停后,您可以添加额外的断点或选择调试">重新启动"以终止应用程序并启动新的调试会话.

Using the Step Over button in the debugger toolbar, begin stepping through the code. As each line of code executes, you can examine the program’s state. The value of a variable is sometimes drawn in red to indicate that the value was modified in the last step. Notice that the debugger pauses before executing the indicated line. After each pause, you can add additional breakpoints or choose Debug > Restart to terminate the application and start a new debugging session.

现在我在过去一个小时里一直在纠结的是这个调试器只会向我显示汇编代码.我可以手动选择我的源代码文件,但是一旦我点击Step over",我就会回到汇编程序视图中.我一生都无法弄清楚如何关闭汇编程序,并让它显示我的源代码!

now what I've been pulling my hair out for over the last hour is the fact that this debugger will only show me assembly code. I can manually select my source code file, but as soon as I click "Step over" I'm right back in assembler view. I can't for the life of me figure out how to turn the assembler off, and make it show me my source code!

推荐答案

我知道这篇文章已经有一百年历史了,但以防万一有人想知道如何在更新的 Xcode 版本(而不是 Xcode 3)中解决这个问题,您将在 Xcode 6 及更高版本中的 Debug>Debug Workflow 下找到标记为 Always Show Disassembly 的适当设置.确保该选项被选中.

I know this article is a hundred years old, but in case anyone is wondering how to address this issue in more recent Xcode versions (as opposed to Xcode 3), you'll find the appropriate setting labeled Always Show Disassembly under Debug>Debug Workflow in Xcode 6 and up. Ensure the option is NOT checked.

在 Xcode 5 中,该选项在 Debug>Debug Workflow 下被标记为 Show Disassembly When Debugging.确保调试时显示反汇编"未选中.

In Xcode 5, the option was labeled Show Disassembly When Debugging under Debug>Debug Workflow. Ensure that "Show Disassembly When Debugging" is unchecked.

回到 Xcode 4,调试时显示反汇编设置位于产品>调试工作流程下.再次确保该选项保持未选中状态.

Back in Xcode 4, the Show Disassembly When Debugging setting was found under Product>Debug Workflow. Again, ensure that the option remains unchecked.

这也让我发疯了.

注意:以上信息对 Xcode 13+ 仍然有效.随着新版本的 Xcode 的发布,我已经对此答案进行了更新.幸运的是,该选项自 Xcode 6(到目前为止)以来一直保持不变.

这篇关于Xcode Debugger:为什么只显示汇编程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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