开发者

How can I see when the value of a variable change?

I have this really nasty bug in my program, which somehow changes the value of my variable.开发者_开发知识库 I have tried setting break points but can't find the line of code that's the culprit.

Is there any way to pause program execution when there's a line of code that's changing the value of a variable in Xcode 4?


One way would be to find the value changing operations or in general any bug using bisection. Ie. you choose two breakpoints that have the problematic operation in between and move one of them to middle and check if the value still changes. If it does repeat in this halt, if not repeat in the other half.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜