每次我尝试在调试器控制台中打印时,Xcode 7都会崩溃

时间:2023-01-23 14:45:52

I've searched around and can't find anything on this.

我四处搜索,找不到任何相关内容。

Using Swift 2 and Xcode Version 7.0.1 (7A1001). Every time I execute something in the debugger console, Xcode crashes.

使用Swift 2和Xcode版本7.0.1(7A1001)。每次我在调试器控制台中执行某些操作时,Xcode都会崩溃。

The project is not very big, and has less than 10 third party frameworks.

该项目不是很大,并且只有不到10个第三方框架。

I can't think of much more information that's relevant, but I'm sure there's more, so please do ask me if there's anything I should add to my question that would help.

我想不出更多相关的信息,但我确信还有更多,所以请问我是否有任何我应该添加到我的问题中的任何内容。

I've of course cleaned build and derived data.

我当然清理了构建和派生数据。

It's driving me insane. Thanks!

这让我疯了。谢谢!



UPDATE 16/11/12

更新16/11/12

Submitted rdar://23559366.

提交rdar:// 23559366。

3 个解决方案

#1


4  

How are you maintaining your third party frameworks? Via Carthage?

你是如何维护你的第三方框架的?通过迦太基?

If so then this is probably your issue: https://github.com/Carthage/Carthage/issues/924

如果是这样,那么这可能是你的问题:https://github.com/Carthage/Carthage/issues/924

This is an issue if the location of the /Carthage/Build/iOS folder is in a different location to where it was produced (i.e if it was compiled on a different machine and the absolute file path has changed).

如果/ Carthage / Build / iOS文件夹的位置与生成它的位置不同(即,它是在不同的计算机上编译并且绝对文件路径已更改),则会出现问题。

A temporary fix would be to run carthage build --no-use-binaries on your machine to rebuild the symbols using the current absolute file path working around the bug.

临时解决方法是在您的机器上运行carthage build --no-use-binaries,使用当前的绝对文件路径重建符号。

But if you wasn't using carthage then its probably not your issue so sorry

但如果你没有使用迦太基,那么它可能不是你的问题,对不起

#2


0  

I had similar problem with Xcode whenever I hit breakpoint.

每当我遇到断点时,我都会遇到与Xcode类似的问题。

每次我尝试在调试器控制台中打印时,Xcode 7都会崩溃

In case you see this screen right before your Xcode crashes - you are lucky and my fix might save you. All you need to do is open this window and in the Project Navigator, select any file that you want, so that instead of that white blank view you would get your code. After this you are most likely will be able to successfully stop your app at your breakpoint and perform the debug.

如果你在Xcode崩溃之前看到这个屏幕 - 你很幸运,我的修复可能会省你。您只需打开此窗口并在Project Navigator中选择您想要的任何文件,这样您就可以获得代码而不是那个白色的空白视图。在此之后,您很可能能够在断点处成功停止应用程序并执行调试。

I am not sure why this happens, but I suspect that the reason is Debug View Hierarchy mode, which you might have triggered prior to setting you breakpoint and trying to stop at it. At least this is when it happens to me.

我不确定为什么会发生这种情况,但我怀疑原因是Debug View Hierarchy模式,您可能在设置断点并尝试停止之前触发了该模式。至少这是发生在我身上的时候。

#3


0  

I have similar problem earlier. If you try to print non-optional variable and unfortunately it holds nil value then it breaks/crash. so that make sure declare all possible variables as "Optional type".

我之前有类似的问题。如果您尝试打印非可选变量,并且不幸的是它保持nil值,那么它会中断/崩溃。这样确保将所有可能的变量声明为“可选类型”。

#1


4  

How are you maintaining your third party frameworks? Via Carthage?

你是如何维护你的第三方框架的?通过迦太基?

If so then this is probably your issue: https://github.com/Carthage/Carthage/issues/924

如果是这样,那么这可能是你的问题:https://github.com/Carthage/Carthage/issues/924

This is an issue if the location of the /Carthage/Build/iOS folder is in a different location to where it was produced (i.e if it was compiled on a different machine and the absolute file path has changed).

如果/ Carthage / Build / iOS文件夹的位置与生成它的位置不同(即,它是在不同的计算机上编译并且绝对文件路径已更改),则会出现问题。

A temporary fix would be to run carthage build --no-use-binaries on your machine to rebuild the symbols using the current absolute file path working around the bug.

临时解决方法是在您的机器上运行carthage build --no-use-binaries,使用当前的绝对文件路径重建符号。

But if you wasn't using carthage then its probably not your issue so sorry

但如果你没有使用迦太基,那么它可能不是你的问题,对不起

#2


0  

I had similar problem with Xcode whenever I hit breakpoint.

每当我遇到断点时,我都会遇到与Xcode类似的问题。

每次我尝试在调试器控制台中打印时,Xcode 7都会崩溃

In case you see this screen right before your Xcode crashes - you are lucky and my fix might save you. All you need to do is open this window and in the Project Navigator, select any file that you want, so that instead of that white blank view you would get your code. After this you are most likely will be able to successfully stop your app at your breakpoint and perform the debug.

如果你在Xcode崩溃之前看到这个屏幕 - 你很幸运,我的修复可能会省你。您只需打开此窗口并在Project Navigator中选择您想要的任何文件,这样您就可以获得代码而不是那个白色的空白视图。在此之后,您很可能能够在断点处成功停止应用程序并执行调试。

I am not sure why this happens, but I suspect that the reason is Debug View Hierarchy mode, which you might have triggered prior to setting you breakpoint and trying to stop at it. At least this is when it happens to me.

我不确定为什么会发生这种情况,但我怀疑原因是Debug View Hierarchy模式,您可能在设置断点并尝试停止之前触发了该模式。至少这是发生在我身上的时候。

#3


0  

I have similar problem earlier. If you try to print non-optional variable and unfortunately it holds nil value then it breaks/crash. so that make sure declare all possible variables as "Optional type".

我之前有类似的问题。如果您尝试打印非可选变量,并且不幸的是它保持nil值,那么它会中断/崩溃。这样确保将所有可能的变量声明为“可选类型”。