简体   繁体   English

Xcode 在断点处停止时不显示代码

[英]Xcode doesn't show code when stops at breakpoints

I'm having this weird bug: I put some breakpoints in my code, the debugger stops on them, but Xcode doesn't bring me to the file/line where breakpoints are.我遇到了这个奇怪的错误:我在代码中放置了一些断点,调试器停止了它们,但是 Xcode 没有将我带到断点所在的文件/行。 It just jumps to the project page where you edit your project settings (build phases, build settings, etc.).它只是跳转到您编辑项目设置(构建阶段、构建设置等)的项目页面。 And when I go to the breakpoints navigator and click on a breakpoint, it doesn't take me to the breakpoint either.当我转到断点导航器并单击断点时,它也不会将我带到断点。

I don't have a clue why this happen.我不知道为什么会发生这种情况。 Breakpoints in my other project work fine.我的其他项目中的断点工作正常。

Have you ever had this problem?你有没有遇到过这个问题? If someone could help I would be very greatful.如果有人可以提供帮助,我将非常感激。 It's really annoying.这真的很烦人。

I'm using Xcode 4.2.我正在使用 Xcode 4.2。

I had the same problem, running Xcode 4.2 under Mac OS 10.6.8.我遇到了同样的问题,在 Mac OS 10.6.8 下运行 Xcode 4.2。 Here's what worked for me:以下是对我有用的内容:

Product Menu-->Debug Workflow-->Show Disassembly When Debugging

Make sure this option is not checked.确保未选中此选项。

Modifications to the @user3308886 & @El Capitan v2.0 answer to support for Xcode 11修改 @user3308886 和 @El Capitan v2.0 答案以支持 Xcode 11

== Xcode 11 == == Xcode 11 ==

Check if there is a tick is on the following option, if there is a tick , uncheck it .检查以下选项是否有勾号,如果有勾号,取消勾选

From the Xcode Menu从 Xcode 菜单

Debug -> Debug workflow -> Show Disassembly / Always show Disassembly.

Same bug happen to me as well,同样的错误也发生在我身上,

1) I just clean my project and compiled it again. 1)我只是清理我的项目并再次编译它。

2) Restarted my Xcode and it worked for me. 2)重新启动我的Xcode,它对我有用。

I had the same problem in Xcode 10.2.1. 我在Xcode 10.2.1中遇到了同样的问题。 Debug Menu->Debug WorkFlow->Show Always Disassembly Deselect this menu so that we can see the code. 调试菜单->调试工作流程->显示始终反汇编取消选择此菜单,以便我们查看代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM