Xcode調(diào)試斷點不能停在代碼區(qū)終極解決方案
作者:oppotvr
很多時候,在調(diào)試程序的時候,我們很想馬上知道錯誤的代碼在哪一行。 而不想大概設(shè)置一個斷點,逐行調(diào)試發(fā)現(xiàn)最終是哪一行代碼出問題導(dǎo)致程序崩潰。 可以使用下面這個辦法快速定位問題代碼。
當(dāng)我們在開發(fā)xcode程序時,往往要用到xcode調(diào)試,但由于不小心修改了一些配置信息,而導(dǎo)致在調(diào)試時不能追蹤到具體的代碼區(qū),以下就是個人的解決辦法
1,首先要進入調(diào)試模式
設(shè)置斷點,點擊運行
或者
- - (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,以上操作完成以后就會出現(xiàn)以下結(jié)果
現(xiàn)在就可以看到調(diào)試的當(dāng)前代碼了
責(zé)任編輯:閆佳明
來源:
oschina