“return” from method while stepping?

后端 未结 3 1634
抹茶落季
抹茶落季 2021-01-11 11:42

I would like to exit out the current method that I\'m stepping through.

-(void)helloWorld {
    NSLog(@\"Hello\");
    // I would like to return here, so tha         


        
3条回答
  •  心在旅途
    2021-01-11 12:43

    Unfortunately in Xcode 4.5.x there is no way to force an early return from a function. In the current lldb sources over at http://lldb.llvm.org/ there is a newly added command, thread return, which does what you want - it includes the ability to specify the return value of the function. This won't be in Xcode until the next major release, though.

自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题