Why is my xcode 4.2 log always empty?

后端 未结 4 2039
深忆病人
深忆病人 2021-01-17 04:35

in a method that is accessed three times I want to write something to the log.

NSLog(@\"%@\", [response responseString]);

But there is noth

4条回答
  •  庸人自扰
    2021-01-17 05:11

    NSString *responseString = [response responseString];
    NSLog(@"%@", responseString);
    

    set a breakpoint on the first line and debug the application to see if its coming in this code in the first place. If it is, hover over responseString and it will tell you whether it is nil or not.

提交回复
热议问题