George
George

Reputation: 534

Xcode 4, debugging, breakpoints, NSLogs

I am hoping someone can help me. I have just started running xcode 4.01 and for some reason whenever I run an app, it does not stop on breakpoints or display the NSlog messages. I have a message in my viewDidLoad and it never shows. I even breakpoint on this log and the best I can get in the output window is:

pending breakpoint 1 - "universalTestAppDelegate_iPad.m:15" resolved

pending breakpoint 2 - "universalTestAppDelegate_iPhone.m:16" resolved

Actual code is:

-(void) viewDidload
{
   NSLog("in viewDidLoad");  
}

So it appears it sees the breakpoint but never stops on it. As I said, brand new to xcode 4 so any idea on what I am doing wrong? Uninstalled and reinstalled and still nothing. Also, if it means anything, in the Scheme to choose where to run, I can select IOS devie, iPad 43 simulator and iPhone 4.3 simulator. Tried both and still nothing. Why can't I select/see other versions of the IOS?

BTW: The above is because I do not have my iPad or iPhone connected. Thanks in advance for any and all help.

Geo...

Upvotes: 2

Views: 1606

Answers (3)

pfs
pfs

Reputation: 477

I had similar issue where the debugger would not stop on breakpoints in the simulator using Xcode 4C199. Turns out the simulator was just buggered and restarting it resolved the issue.

I also had the issue with XCode 3 where I had localized the name of the app to a set of Japanese characters. The debugger didn't like that. I solved that one by having english name for debug configuration and japanese name for release.

Upvotes: 0

Eiko
Eiko

Reputation: 25632

Your method is just never called.

Make it

-(void) viewDidLoad

with big "L" and your chances of "breaking" will sky rocket. ;)

Upvotes: 3

Caleb
Caleb

Reputation: 125007

Two possibilities:

  1. You don't have breakpoints turned on. Use the Product->Debug->Activate Breakpoints command to rectify this.

  2. You have breakpoints turned on but you placed your breakpoints on lines that haven't been executed. If your log statement doesn't appear in the console, that would indicate that the method containing that statement isn't executing, so it's no surprise that the breakpoint on that line has no effect.

Upvotes: 1

Related Questions