Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Breakpoint breaking at wrong line

breakpoint wrong line

The screen shot should be pretty self-explanatory, but I am having issues ensuring my viewDidAppear method is being called. When I set a breakpoint, it breaks in viewDidLoad.

As a side note, none of my NSLog()s are writing to the console either.

I did clean my build directory as I had seen recommended elsewhere, but no joy.

like image 958
Jason Pawlak Avatar asked Jan 26 '13 17:01

Jason Pawlak


3 Answers

Solution was (as originally suspected... bad cached data. But looking in the wrong place. Someone in the iOS Simulator, the app was not being updated and was running off old data.

Deleted app from Simulator (Reset Contents and Settings) and all is good with the world.

Killing the derived data both manually in Finder and through Xcode did not give a complete solution.

Appreciate you all that were quick to respond.

like image 177
Jason Pawlak Avatar answered Oct 14 '22 12:10

Jason Pawlak


There may be a two reasons...

1.Your program is crashing in that line itself before the breakpoint.

2.After compiling you have deleted 6 lines, therefore the breakpoint shows 6 lines later.

Never put enter or remove empty lines, while you put breakpoints in your code. You will not get breakpoint at correct line.

like image 2
Anoop Vaidya Avatar answered Oct 14 '22 11:10

Anoop Vaidya


try to add breakpoint at the line [super viewDidLoad]; and then to delete it.

like image 1
One Man Crew Avatar answered Oct 14 '22 12:10

One Man Crew