简体   繁体   English

Xcode 6忽略了断点 - Swift

[英]Xcode 6 ignoring breakpoints - Swift

Xcode 6 is completely ignoring my breakpoints. Xcode 6完全忽略了我的断点。 I saw a post here from 2008, but the answers are outdated, and don't seem to work. 2008年看到了这里的帖子,但答案已经过时了,似乎没有用。

EDIT: 编辑:

This is happening only with projects that I start. 这只发生在我开始的项目中。 All my downloaded open source projects work perfectly fine, as well as projects I started a few months ago. 我下载的所有开源项目都运行得很好,以及我几个月前开始的项目。

UPDATE: 更新:

This is what I get when I create a brand new project and set a breakpoint in viewDidLoad 这是我在创建一个全新的项目并在viewDidLoad设置断点时得到的结果

在此输入图像描述

After trying many different things, I ran 在尝试了很多不同的事情后,我跑了

defaults delete com.apple.dt.Xcode

This reset my Xcode settings. 这会重置我的Xcode设置。 Now when I create a new project, breakpoints work fine. 现在,当我创建一个新项目时,断点工作正常。

I realized that the problem happened when I added Cocoapods to the project. 我意识到当我将Cocoapods添加到项目中时就出现了问题。 B/c right after I ran pod install , breakpoints stopped working. B / c我运行pod install ,断点停止工作。 I'm not sure why. 我不知道为什么。

Hope this helps anyone with the same problem 希望这可以帮助任何有同样问题的人

I had a similar issue when I added a target to my project. 当我向项目添加目标时,我遇到了类似的问题。 Breakpoints placed in that target were ignored. 放置在该目标中的断点被忽略。

The solution was to set "Debug Information Format" in the new target's build settings to "DWARF with dysm" 解决方案是将新目标的构建设置中的“调试信息格式”设置为“DWARF with dysm”

In XCode 7.1 it defaulted to DWARF 在XCode 7.1中,它默认为DWARF

There can be various culprits for this, a common one being setting the build scheme to Release instead of Debug. 可能有各种各样的罪魁祸首,常见的是将构建方案设置为Release而不是Debug。

For me it was the Debug Optimization Level set to -O0 in my target's build settings. 对我来说,我的目标的构建设置中的调试优化级别设置为-O0。 Changing it to "Fast [-O, O1]" makes Xcode breakpoint-respectful again. 将其更改为“Fast [-O,O1]”会使Xcode断点再次受到尊重。

在此输入图像描述

There is an interesting post about it here: 这里有一篇有趣的帖子:

http://blog.credland.net/2014/03/xcode-debugger-why-do-you-stop-working.html http://blog.credland.net/2014/03/xcode-debugger-why-do-you-stop-working.html

关闭Xcode并删除派生数据然后重新打开Xcode它将起作用

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

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