MendyK
MendyK

Reputation: 1488

Xcode 6 ignoring breakpoints - Swift

Xcode 6 is completely ignoring my breakpoints. I saw a post here from 2008, but the answers are outdated, and don't seem to work.

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

enter image description here

Upvotes: 4

Views: 1734

Answers (4)

Adam Ritenauer
Adam Ritenauer

Reputation: 3181

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"

In XCode 7.1 it defaulted to DWARF

Upvotes: 2

Rodrigo Pinto
Rodrigo Pinto

Reputation: 2414

There can be various culprits for this, a common one being setting the build scheme to Release instead of Debug.

For me it was the Debug Optimization Level set to -O0 in my target's build settings. Changing it to "Fast [-O, O1]" makes Xcode breakpoint-respectful again.

enter image description here

There is an interesting post about it here:

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

Upvotes: 1

Sourabh Shekhar
Sourabh Shekhar

Reputation: 167

Close Xcode and remove the derived data and then reopen Xcode it will work

Upvotes: 0

MendyK
MendyK

Reputation: 1488

After trying many different things, I ran

defaults delete com.apple.dt.Xcode

This reset my Xcode settings. Now when I create a new project, breakpoints work fine.

I realized that the problem happened when I added Cocoapods to the project. B/c right after I ran pod install, breakpoints stopped working. I'm not sure why.

Hope this helps anyone with the same problem

Upvotes: 4

Related Questions