Xcode调试器: Why is it only showing me assembler?

标签 xcode cocoa debugging

我刚刚开始在 Xcode 中进行 Cocoa 开发,正在做 hello world 示例。我已完成“runtime debugging”部分的第 6 步,即

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”,我就会立即返回汇编器 View 。我怎么也想不出如何关闭汇编器,并让它显示我的源代码!

最佳答案

我知道这篇文章已经有一百年历史了,但是如果有人想知道如何在更新的 Xcode 版本(而不是 Xcode 3)中解决这个问题,您会找到标记为 Always Show 的适当设置Xcode 6 及更高版本中调试>调试工作流程下的反汇编。确保选中该选项。

在 Xcode 5 中,该选项在调试>调试工作流程下标记为调试时显示反汇编。确保未选中“调试时显示反汇编”。

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

这也让我发疯。

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

关于Xcode调试器: Why is it only showing me assembler?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1421093/

相关文章:

iOS 根 Controller 启动时出现错误

ios - 尝试存档项目时 Admob 导致 Apple Mach-O 链接器错误

ios - 获取 "nested push animation can result in corrupted navigation bar"

objective-c - NSTextView 在没有停靠图标的应用程序中没有响应

objective-c - 如何制作一个出现在全屏窗口顶部的 Cocoa 窗口?

cocoa - 防止 Cocoa 文档应用程序退出时出现 "Save on Exit"对话

linux - QtCreator调试中的环境变量

c - 爱特梅尔 SAM4S8B : Unable to enter Programming mode

swift - 无法将类型 'Data' 的值转换为指定类型 'Data'

ios - 显示程序化 Storyboard View 更改