Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XCode automatically deactivating breakpoints

Tags:

c++

xcode

macos

I'm using xcode in C++. I'm trying to debug my project, but at random intervals, it seems to ignore my breakpoints. There are three things that it does:

1) Sometimes, when I run, it automatically switches to "de-activate break points" mode. (the relevant button goes light and says "Activate")

2) Sometimes when I run, ALL of my breakpoints go "can't find" mode, with the yellow insides. I need to click twice on them to get them back dark blue (once to light blue = inactive, once to dark blue = active)

3) Sometimes, when I run, my breakpoint is dark blue, the button says "deactivate" and it still just ignores my breakpoint, running straight past it.

This makes it very difficult to debug my program...

I should add that I'm using XCode 3.1 beta on OSX 10.5.6, in case that matters.

thanks.

like image 606
Brian Postow Avatar asked Feb 09 '09 17:02

Brian Postow


People also ask

Why are my breakpoints disabled?

If a source file has changed and the source no longer matches the code you're debugging, the debugger won't set breakpoints in the code by default. Normally, this problem happens when a source file is changed, but the source code wasn't rebuilt. To fix this issue, rebuild the project.

Why breakpoint is not working in Xcode?

You might be pushing "Run" instead of "Debug" in which case your program is not running with the help of gdb, in which case you cannot expect breakpoints to work! In Xcode 6.4, there is now only a Run button and whether it runs a debug configuration or not depends on the currently selected scheme settings.

How do you keep breakpoints?

Set breakpoints in source code To set a breakpoint in source code: Click in the far left margin next to a line of code. You can also select the line and press F9, select Debug > Toggle Breakpoint, or right-click and select Breakpoint > Insert breakpoint. The breakpoint appears as a red dot in the left margin.

How do you stop a breakpoint in Xcode?

Specify where to pause your app Xcode displays a breakpoint icon to indicate the location. Drag a breakpoint up or down to move it to another location; drag it away from the gutter to remove it. Click the breakpoint icon in the debug area toolbar to activate or deactivate all breakpoints.


1 Answers

Try unchecking the Load symbols lazy in the Debugging panel in Preferences

alt text http://img.skitch.com/20090209-gj947qk7dxdyms1wij4q5em2f2.jpg

like image 148
epatel Avatar answered Sep 23 '22 11:09

epatel