断点在 xcode pod 文件中不起作用

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/36399159/
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 08:41:24  来源:igfitidea点击:

Breakpoints are not working in xcode pod files

iosobjective-cxcodecocoapods

提问by Uday Singh

I have a xcode project which includes few cocoa pod files. When i put breakpoints in cocoa pod files, the debugger does not stops at those breakpoints, why? Could anyone have any idea about the same?.

我有一个 xcode 项目,其中包含很少的可可豆荚文件。当我在 cocoa pod 文件中放置断点时,调试器不会在这些断点处停止,为什么?任何人都可以有任何想法吗?

回答by Lance Samaria

I followed @UdaySingh's comment and it worked, I'm not sure why he didn't post an answer but I realize there are people who sometimes need a step by step and a visual guide tremendously helps. Here's the visual version of his comment.

我遵循了@UdaySingh 的评论并且它奏效了,我不知道他为什么没有发布答案,但我意识到有些人有时需要一步一步的指导,而视觉指南非常有帮助。这是他评论的视觉版本。

In the project navigator select the blue project icon.

在项目导航器中选择蓝色项目图标。

enter image description here

在此处输入图片说明

In Xcode 11.2.1 they switched the below photos to Project, it used to be under Target

在 Xcode 11.2.1 中,他们将下面的照片切换到 Project,它曾经在 Target 下

enter image description here

在此处输入图片说明

Important. The pic below is from Projectin Xcode 11.2.1, this where you need to go:

重要的。下面的图片来自ProjectXcode 11.2.1,这是你需要去的地方:

enter image description here

在此处输入图片说明

Select Build Settings.

选择Build Settings

The pic below is from Projectin Xcode 10.1, this is where you would need to go:

下面的图片来自ProjectXcode 10.1,这是你需要去的地方:

enter image description here

在此处输入图片说明

In the search field type Build Active Architectureand make sure Debugis set to Yes

在搜索字段中键入Build Active Architecture并确保Debug设置为Yes

enter image description here

在此处输入图片说明

In the same search field now type in Optimization Level. Change Debugand Releaseto None

现在在同一搜索字段中输入Optimization Level. 更改DebugReleaseNone

enter image description here

在此处输入图片说明

As per @matt's comments below also do a clean afterwards.

根据@matt 在下面的评论,之后也要进行清理。

That's it

就是这样

回答by Pei

In my case, cleaning Pods directory and installing pods again worked. Spent hours for this so hope it would be helpful for someone who couldn't find a solution yet.

就我而言,清理 Pods 目录并再次安装 Pods 有效。花了几个小时,所以希望它对那些还找不到解决方案的人有所帮助。