Xcode 4 中的“Run > Stop on Objective-C 异常”?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4961770/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
"Run > Stop on Objective-C exception" in Xcode 4?
提问by ddnv
Maybe somebody knows where is the "Run > Stop on Objective-C exception" menu in Xcode 4? I've used it sometimes in Xcode 3, but it disappeared in the new IDE.
也许有人知道 Xcode 4 中的“Run > Stop on Objective-C exception”菜单在哪里?我有时在 Xcode 3 中使用它,但它在新的 IDE 中消失了。
回答by Tylerc230
In the left side column of xcode 4:
在 xcode 4 的左侧栏中:
- tap on the breakpoint tab (the 6th tab over)
- tap on the + button in the bottom left of the window
- tap 'add exception breakpoint'
- tap 'done' on the popup
- 点击断点选项卡(第 6 个选项卡)
- 点击窗口左下角的 + 按钮
- 点击“添加异常断点”
- 在弹出窗口中点击“完成”
回答by Naveen Shan
See the image It will help,
看图有帮助
good luck, Naveen Shan
祝你好运,纳文山
回答by xgalaxy
Someone else told me this, and I'm adding it here so I can favorite this question and have a useful reference to look back on.
其他人告诉我这个,我在这里添加它,所以我可以喜欢这个问题,并有一个有用的参考来回顾。
Set the objc exception breakpoint action to po $eaxand you'll usually get the handy-dandy exception message right there in the debugger window when it breaks.
将 objc 异常断点操作设置为po $eax,当它中断时,您通常会在调试器窗口中立即获得方便的异常消息。