Break break point on wrong line

breakpoint wrong line

The screenshot should be pretty straightforward, but I'm having problems calling my viewDidAppear method. When I set a breakpoint, it breaks into viewDidLoad .

As a side note, none of my NSLog() writes to the console.

I cleaned my build directory, as I saw, recommended elsewhere, but without joy.

+6
source share
4 answers

The solution was (as originally supposed ... badly cached data), but looking in the wrong place. Someone from iOS Simulator, the application did not update and did not run old data.

The remote application from the Simulator (Reset Content and Settings), and all is well with the world.

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

Appreciate everything that was quick to respond.

+3
source

There may be two reasons ...

1. Your program crashes in this line to a breakpoint.

2. After compilation, you deleted 6 lines, so the breakpoint displays 6 lines later.

Never put input or delete blank lines while you put breakpoints in your code. You will not get a breakpoint on the right line.

+2
source

try adding a breakpoint on the line [super viewDidLoad]; and then delete it.

+1
source

press + alt + b to see all breakpoints.

Select the breakpoint you want to delete and click "Delete."

if the problem persists then follow these steps

Included in the "Assembly Settings" as part of the target project change the "Optimization Level" for "Debug" to "No".

OR

In xCode4:

The name of your project → Change the scheme Information tab (in the launch configuration) Set the configuration to Debug, Debugger to LLDB (formerly GDB) Run the project.

+1
source

All Articles