Xcode debugger kills me!

Member
Posts: 39
Joined: 2008.09
Post: #1
I'm setting a simple breakpoint somewhere in my (c++ basically) code and press debug in simulator. When I run, the breakpoint marker (blue rectangle) turns yellow and doesn't work. What actually helps is this - I go on top of the application, and set breakpoint there (i.e. myEAGLview), then it stops, I have to press continue to go to my real breakpoint. This happens on a real device too.
What's going on and how do I stop it?

On a real device I have some other trouble:

I keep receiving messages like this one, when debugging step-by-step, every step.
"mi_cmd_stack_list_frames: Not enough frames in stack."


PS: Another short question, for which I wouldn't want a new thread. In my game, somewhere AI takes place and it's a very long loop which stop the whole game for about 2 seconds. After that, there's a short flickering of a display. Why does it flicker?
Quote this message in a reply
Moderator
Posts: 133
Joined: 2008.05
Post: #2
For the solution to your debugger problem, go to Xcode preferences and select the Debugging tab. Deselect "Load Symbols Lazily" and rebuild and run your application.

Without showing any code, don't know the solution to the rest of your problems. If your AI is taking 2 seconds to perform, you are probably doing something wrong though.
Quote this message in a reply
Member
Posts: 39
Joined: 2008.09
Post: #3
longjumper Wrote:For the solution to your debugger problem, go to Xcode preferences and select the Debugging tab. Deselect "Load Symbols Lazily" and rebuild and run your application.

Last time I tried this, the whole app stopped working Smile. I will try again, though.

Quote:Without showing any code, don't know the solution to the rest of your problems. If your AI is taking 2 seconds to perform, you are probably doing something wrong though.

No, it's quite allright, the game is turn-based. Actually, it's 2-4 seconds, which is not perfect but still acceptable. I can't show the code, since it's a huge portion of code which won't help anyway. However, I don't call any drawing functions during the AI cycle, so my idea was that opengl buffer becomes obsolete and somehow gets automatically deleted..
Maybe I should call AI stuff right after swapping buffers.
Quote this message in a reply
Member
Posts: 39
Joined: 2008.09
Post: #4
Great, lazy symbols actually worked! Smile. Thanks. Still don't understand why I get this flickering, though.
Quote this message in a reply
Member
Posts: 241
Joined: 2008.07
Post: #5
I had the same problem. Turning off lazy symbols doesn't always fix the problem. Whatever last mode you ran in, the go command will execute next time. So if you build and run, it seems to disable breakpoints. This actually is a brilliant feature allowing you to save your breakpoints when you want your app to just run. For debugging, run in debug mode once and after that you can use Go and it will not screw with your breakpoints.
Quote this message in a reply
Member
Posts: 39
Joined: 2008.09
Post: #6
I only wish the xcode had edit-and-continue feature - it would literally saved me 10s of hours. Apart from that, it's quite fine medieval IDE.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  XCode 3.2.3 debugger only showing assembler issue Madrayken 7 6,391 Jul 28, 2010 10:28 AM
Last Post: Skorche
  Ambient Music in my app kills performance AdrianM 10 7,171 Dec 8, 2009 10:10 AM
Last Post: wonza
  debugger exited with status 1 jeonghyunhan 1 2,519 Apr 3, 2009 11:48 AM
Last Post: kodex
  Display strings in xcode debugger captainfreedom 0 4,165 Oct 19, 2008 11:36 AM
Last Post: captainfreedom