How to change NSString value while debugging in Xcode?

前端 未结 4 1926
失恋的感觉
失恋的感觉 2020-12-23 13:35

When I\'m stopped at a break point in Xcode, I can see the value of NSString variables. How can I change them? I can change int or double variables, but not NSString.

4条回答
  •  执笔经年
    2020-12-23 13:57

    (https://stackoverflow.com/users/1202867/n8tr) n8tr's comment from above shows how to do it. You just precede your assignment with "po " like so: po myString = @"my_new_string" and po self.title = @"New Title".

提交回复
热议问题