XCode 不会在断点处停止

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18848684/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 03:48:35  来源:igfitidea点击:

XCode not stopping on breakpoint

xcode

提问by Ramaraj T

I have some weired problem with XCode since I upgraded my XCode to 5 from 4.6. When I set the breakpoint in a file, the program actually stops at the breakpoint, but I can't see my code in the workspace. It loads some other system codes like

自从我将 XCode 从 4.6 升级到 5 以来,我对 XCode 有一些奇怪的问题。当我在文件中设置断点时,程序实际上会在断点处停止,但是我在工作区中看不到我的代码。它加载一些其他系统代码,如

 0x2ff8:  calll  0x2ffd  -[ViewController viewDidLoad] + 13 at ViewController.m:28
0x2ffd:  popl   %eax
0x2ffe:  movl   12(%ebp), %ecx
0x3001:  movl   8(%ebp), %edx
0x3004:  movl   %edx, -12(%ebp)
0x3007:  movl   %ecx, -16(%ebp)
0x300a:  movl   18799(%eax), %ecx
0x3010:  movl   18559(%eax), %edx

enter image description here

在此处输入图片说明

When I click the continue button it shows my code again. I have tried,

当我单击继续按钮时,它再次显示我的代码。我试过了,

1) Created new project

1)新建项目

2) Relaunched XCode

2) 重新启动 XCode

3) Restarted the system

3)重新启动系统

4) Re-installed the Xcode

4)重新安装Xcode

None of these helped me. I have seen a lot of questions in StackOverFlow which discuss about "Breakpoints not working..." type, but for me the breakpoints actually working, but not stops in the correct position.

这些都没有帮助我。我在 StackOverFlow 中看到了很多关于“Breakpoints not working...”类型的问题,但对我来说,断点实际上有效,但不会停在正确的位置。

回答by Ramaraj T

I found the problem, Somehow the "Show Disassembly when debugging" was enabled in my XCode which creates that problem. When I disabled it, all my debugger stopped in my source code.

我发现了这个问题,不知何故在我的 XCode 中启用了“调试时显示反汇编”,这导致了这个问题。当我禁用它时,我的所有调试器都停止在我的源代码中。

You can find it under Product->Debug Workflow->Show Disassembly when debugging

您可以在产品->调试工作流->调试时显示反汇编下找到它

Edit

编辑

In the latest XCode it is under Debug->Debug Workflow->Show Disassembly when debugging

在最新的 XCode 中,它位于Debug->Debug Workflow->Show Disassembly when debugging

回答by Kappe

Xcode 6:

代码 6:

Go to Build Settingsand make sure your "Strip style" is set up as "Non-Global Symbols" and not as "All Symbols"

转到构建设置并确保您的“条带样式”设置为“非全局符号”而不是“所有符号

enter image description here

在此处输入图片说明