View Full Version : xCode "Loading program into debugger" takes very long ?
Tex-Twil
Nov 22, 2009, 03:17 AM
Hello,
so here I am reading "Programming in Objective-C 2.0" and writing my first hello word programs.
I have a very simple program but when I debug it, it takes like 30 seconds before the debugging really starts. The Debug console says "Loading program into debugger" and "sharedlibrary apply-load-rules all". Then I have to wait 30 seconds and then the debug stops at my 1st break point.
What's going on ?
I have xCode 3.2 on SL.
Thanks,
Tex
Vizin
Nov 29, 2009, 02:07 PM
Bump. I'm having the same problem.
lee1210
Nov 29, 2009, 02:10 PM
If you set a breakpoint on main does it take as long?
Have you tried manually running gdb on your debug binary to see if it takes the same amount of time?
-Lee
Vizin
Nov 29, 2009, 02:33 PM
Yes to both. Setting the breakpoint has no effect. When I run it in gdb it hangs at "This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ........" for about 45 seconds.
lee1210
Nov 29, 2009, 03:04 PM
At this point I would approach this like any other performance problem, as I can't reproduce this on my system...
You can take a look with instruments to see what GDB is spending its time.
I would run GDB without the program given, start watching, and run:
file myProgram
See if you have a long delay here. If so, take a look at where the most time was spent. If not, restart your watch with instruments and run your program, and once you hit the breakpoint, stop recording with instruments and see where the time was spent.
-Lee
Tex-Twil
Nov 30, 2009, 02:27 AM
As far as I'm concerned, I started another project an now it load fast ..
lloyddean
Nov 30, 2009, 11:00 AM
By chance is it a C++ based project that makes use of STL?
kainjow
Nov 30, 2009, 11:22 AM
I've noticed this recently. It seems to be random. If you disable breakpoints it works as expected, so that must be affecting it somehow.
Eraserhead
Nov 30, 2009, 12:15 PM
I didn't think it loaded the debugger if you have no breakpoints. I might be wrong though.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.