iphone - How to set conditional breakpoint in Xcode? -
my situation here
(gdb) info break num type disp enb address 1 breakpoint keep y 0x0000db8f in -[instrument getformattedpricestring:] @ instrument.m:195 condition not yet parsed: (bool)[[self name] hasprefix:@"7_"] breakpoint hit 1 time current language: auto; objective-c (gdb) p (bool)[[self name] hasprefix:@"7_"] $1 = false (gdb) po name 2_year despite fact condition evaluates correctly, breakpoint breaks execution every time. see peculiar statement condition not yet parsed here. why gdb wouldn't parse condition?
btw use xcode 3.2.6. xcode4 doesn't evaluate conditions a==1
consider temporary assert() or nsassert(). it's more reliable debugger-based expression evaluation. remove assert() call once don't need breakpoint anymore. syntax is:
#include <assert.h> assert( !(expression_on_which_to_break));
Comments
Post a Comment