19

I set a breakpoint in Xcode and run my app on a device. Xcode stops at the breakpoint and the console opens, but I just see a spinning wheel instead of a list of all the variables and Xcode sort of freezes. Nothing happens when I push the Stop button. It unfreezes only if I unplug the device. This just started happening last week.

Other times it will list the variables, but when I click the arrow next to "self" for example, the same "freeze" happens.

This does NOT happen while testing in the simulator.

Any ideas?

jscs
  • 63,694
  • 13
  • 151
  • 195
Nikolay Dyankov
  • 6,491
  • 11
  • 58
  • 79
  • 2
    I've seen this too. Sometimes XCode eventually remembers it's trying to debug (sometimes several minutes), other times it doesn't. I put it down to the fact it's Xcode and thus one expects this kind of behaviour.. – Ben Clayton Mar 01 '13 at 11:15
  • :D Do you know about any solution to this? – Nikolay Dyankov Mar 01 '13 at 11:18
  • 1
    If I did there's be an answer slightly further down the page :-) – Ben Clayton Mar 01 '13 at 11:21
  • 1
    It's not necesserily related, but i would try this recipe: http://stackoverflow.com/a/14447705/653513 It helped me with several different symptomps. – Rok Jarc Mar 01 '13 at 11:29
  • @NikolayDyankov: sorry, i wanted to upvote and downvoted by mistake. Can you make a small difference to your question so i can change my vote? – Rok Jarc Mar 01 '13 at 11:36
  • Upgrade to latest XCode? – i_am_jorf Mar 01 '13 at 18:50
  • @NikolayDyankov, is your code running on several threads? I have noticed that this can throw the debugger off at some breakpoints? One other thought,have you tried to change the Optimization level to none to see if that stops happening? – Khaled Barazi Mar 01 '13 at 20:09
  • @Spectravideo328 Yes, my code is running on several threads. I haven't tried turning off Optimization... will try it if I find where to do it :) – Nikolay Dyankov Mar 02 '13 at 10:12
  • Select the project in the navigator -> Build settings -> Apple LLVM compiler Code generation section -> expand optimization level -> change debug setting to none. – Khaled Barazi Mar 02 '13 at 12:48

6 Answers6

2

This worked for me:

Close Xcode. Open Finder, hit +Shift+G to open "Go to Folder".

Type ~/Library/Developer/Xcode/DerivedData

Delete all folders in this directory and empty trash. Reopen Xcode and try again.

This is thanks to rokjarc (Why does Xcode successfully build & copy my application, but won't launch it?)

Community
  • 1
  • 1
Dan
  • 2,851
  • 3
  • 20
  • 27
2

Just restart your development machine. Worked for me.

Abhinav Dobhal
  • 598
  • 7
  • 12
0

I had the same problem as you i just updated my version of xcode this fixed it for me if that doesn't work reinstall the current version you have. You can do that here but you need to be an apple developer member to do so https://daw.apple.com/cgi-bin/WebObjects/DSAuthWeb.woa/wa/login?appIdKey=d4f7d769c2abecc664d0dadfed6a67f943442b5e9c87524d4587a95773750cea&path=%2F%2Fdownloads%2Findex.action

Obcure
  • 961
  • 3
  • 11
  • 22
0

This is not a solution

I tried the methods explained on this as well as a couple of other answers and forums but none of them worked for me in my situation.

I have edited the launch attribute to Wait for executable to be launched instead of Automatically. It is to test when user opens a app from a push notification when it is not started at all. The debugger would stop and never allow for any step through or po commands.

I just used logging after spending about 2 hours trying to fix the issue. If you are facing similar issues in a very narrow scenario then print() could save you time.

Illegal Argument
  • 10,090
  • 2
  • 44
  • 61
0

I have tried below options one or the other works

  • Removing derived data or doing Clean build folder in xcode
  • Removing and readding break points
  • Restarting xcode or development machine
  • Closing all the memory suck applications
D C T
  • 39
  • 10
-1

Happened to me once. Try to delete the Breakpoints.xcbkptlist file. (deletes all placed breakpoints) and then put back your breakpoint and try again.

Good luck.

Naor Levi
  • 117
  • 7