PDA

View Full Version : Break Point is not working in XCode




jassim
Feb 5, 2008, 02:35 AM
Hi,

I am very new to Cocoa and am using XCode 2.5 for editing the Objective C code. Today i have downloaded a small application for dragging a small rectangle on a Canvas (NSView). But when i set a break point in the mouse down event and tried to drag the rectangle in run mode. But it did not enter into the break point. But the programme is working !!! Why break point is not working. I am using Tiger machine. Pls help me......:)

Thanks in advance.......



gnasher729
Feb 5, 2008, 02:57 AM
Hi,

I am very new to Cocoa and am using XCode 2.5 for editing the Objective C code. Today i have downloaded a small application for dragging a small rectangle on a Canvas (NSView). But when i set a break point in the mouse down event and tried to drag the rectangle in run mode. But it did not enter into the break point. But the programme is working !!! Why break point is not working. I am using Tiger machine. Pls help me......:)

Thanks in advance.......

1. Did you start using the debugger (Command-Y instead of Command-R).
2. Do any breakpoints work? Set one in the first line of main () to check.
3. If any breakpoints work: Are you sure the mouse down event is entered? Very often operations like dragging are filtered out before the mouse down code is called and mouse down is supposed to handle anything that isn't handled otherwise only.

jassim
Feb 5, 2008, 11:24 PM
hi,

thanks for the reply gnasher :) Ys i tried by using Command Y but still it is not working. But i set a NSAlert in that event and it worked fine. But I don't know why the break point is not working. Even i tried by putting a breakpoint in the main(), it is also not working........!! pls help me......:)

toddburch
Feb 5, 2008, 11:36 PM
Is your current build setting Debug or Release? It needs to be Debug to run the debugger.