Xcode調試斷點不能停在代碼區終極解決方案
作者:oppotvr
很多時候,在調試程序的時候,我們很想馬上知道錯誤的代碼在哪一行。 而不想大概設置一個斷點,逐行調試發現最終是哪一行代碼出問題導致程序崩潰。 可以使用下面這個辦法快速定位問題代碼。
當我們在開發xcode程序時,往往要用到xcode調試,但由于不小心修改了一些配置信息,而導致在調試時不能追蹤到具體的代碼區,以下就是個人的解決辦法
1,首先要進入調試模式
設置斷點,點擊運行
或者
- - (IBAction)clickedButton:(id)sender
- UIButton *button = (UIButton *)sender;
- UITableViewCell *cell = (UITableViewCell *)button.superview;
- UITableView *tableView = (UITableView *)cell.superview;
- NSIndexPath *indexPath = [tableView indexPathForCell:cell];
- }
2.點擊菜單product->Debug workflow取消選中show Disassembly when debug
3,以上操作完成以后就會出現以下結果
現在就可以看到調試的當前代碼了
責任編輯:閆佳明
來源:
oschina