kylejs
kylejs

Reputation: 1128

Xcode 7 crash every time I try to print something in the debugger console

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.

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

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

Submitted rdar://23559366.

Upvotes: 7

Views: 1565

Answers (3)

Liam
Liam

Reputation: 12668

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

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).

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.

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

Upvotes: 4

Narendra G
Narendra G

Reputation: 559

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".

Upvotes: 0

Soberman
Soberman

Reputation: 2596

I had similar problem with Xcode whenever I hit breakpoint.

enter image description here

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.

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.

Upvotes: 0

Related Questions