I run a new project. The project maybe downloads from the GitHub.
When I running the project. I want to log at the viewDidload function to help me see which controller is showing at the current time.
By the log, I can see the order of the different controllers loaded.
NSLog((@"%s [Line %d] "), __PRETTY_FUNCTION__, __LINE__);
I type this code in the viewDidLoad
function, it works well.
@implementation STListController
- (void)viewDidLoad {
[super viewDidLoad];
NSLog((@"%s [Line %d] " ), __PRETTY_FUNCTION__, __LINE__);
In the console:
2018-06-14 12:03:09.740756+0800 SwipeTableView[10634:1105858] -[STListController viewDidLoad] [Line 23]
Then I set a Symbolic Breakpoint
To my surprise, the log is wrong. The log by the breakpoint doesn't show as the log code.
2018-06-14 12:05:58.427936+0800 SwipeTableView[10789:1113954] void $__lldb_expr(void *) [Line 45] 0x73ef013aaa6a000d
2018-06-14 12:06:00.168679+0800 SwipeTableView[10789:1113954] void $__lldb_expr(void *) [Line 45] 0x73ef013aaa6a000d
2018-06-14 12:06:01.858458+0800 SwipeTableView[10789:1113954] -[STListController viewDidLoad] [Line 23]
As you see the third log is right.
In the Edit Breakpoint
s action, NSLog((@"%s [Line %d] "), __PRETTY_FUNCTION__, __LINE__);
can't show the same log. The good log is NSLog((@"%s [Line %d] "), __PRETTY_FUNCTION__, __LINE__);
in the code.
I hunt this question. Logging the class name of all UIViewControllers in a project The top answer is perfect to me. I don't find the lldb answer.