When working with iOS, I sometimes have values I need to test with. I may adjust these values 30 times, and have to rebuild/rerun 30 times to test them. This is an obvious hassle.
So I was wondering (using the iOS SDK) if it was possible to tweak small parameters/data at the app's runtime? Just to make life convenient.
BreakPointlldb debug area type:Example 1:
expr (void)[aView setBackgroundColor:(UIColor*)[UIColor redColor]]
Here, aView is an UIView for which I want to see its frame at runtime. I am calling the setBackgroundColor method of an UIView at runtime. Any method could be called like that.
Example 2:
expr nsstringVariable = @"yourRunTimeValue"
Here, I am changing a string variable at run time.
For more help on expr type
help expr
I highly recommend people to read this tutorial by Brian Moakley Intermediate Debugging with Xcode 4.5
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With