Xcode + 删除所有断点

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1665744/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 03:12:17  来源:igfitidea点击:

Xcode + remove all breakpoints

xcodebreakpoints

提问by pratik

Is there any way to remove all the breakpoints in Xcode?

有没有办法删除Xcode中的所有断点?

回答by mxg

Well there's a 3 step way:

那么有一个 3 步的方法:

  1. Press CMD(?)+7 to show all breakpoints. In Xcode4 press CMD(?)+6, in Xcode3 press CMD(?)+ALT+B.
  2. Select all breakpoints with CMD(?)+A and delete them, like deleting text, with backspace.
  3. There's no step 3 :)
  1. 按 CMD(?)+7 显示所有断点。在 Xcode4 中按 CMD(?)+6,在 Xcode3 中按 CMD(?)+ALT+B。
  2. 用 CMD(?)+A 选择所有断点并删除它们,就像删除文本一样,用退格键。
  3. 没有第 3 步 :)

回答by iPhoneProcessor

Its very easy to do in new Xcode. Just click on breakpoints Tab then select all then delete.

在新的 Xcode 中很容易做到。只需单击断点选项卡,然后全选然后删除。

Xcode 10 Screenshot:

Xcode 10 截图:

enter image description here

在此处输入图片说明

Old Xcode Screenshot:

旧的 Xcode 截图:

enter image description heretap. See attach image for clear reference.

在此处输入图片说明轻敲。请参阅附件图片以获得清晰的参考。



回答by Azik Abdullah

In Xcode, you can also do by right clicking the project name on the breakpoints tab and then you can see the options for deleting all breakpoints including disabling and sharing breakpoints.

在 Xcode 中,您也可以通过在断点选项卡上右键单击项目名称,然后您可以看到删除所有断点的选项,包括禁用和共享断点。

enter image description here

在此处输入图片说明

回答by James Moore

In Xcode 4, in the debugger console, type "breakpoint delete" or "br del" for short:

在 Xcode 4 中,在调试器控制台中,简称为“断点删除”或“br del”:

(lldb) br del
About to delete all breakpoints, do you want to do that?: [Y/n] y
All breakpoints removed. (1 breakpoints)
(lldb) 

You can't rely on the GUI breakpoint list, since nothing you enter from the command line will show up there.

您不能依赖 GUI 断点列表,因为您从命令行输入的任何内容都不会显示在那里。

回答by cdespinosa

Other ways:

其他方法:

  • Select Breakpoints group in Groups and Files tree, click in Detail view, Command-A, Delete
  • Disclose Breakpoints smartgroup in Groups and Files tree, shift- or command-select breakpoints in outline, press Delete
  • Run > Console, when app is paused, type "delete breakpoints" and press Return
  • 在“组和文件”树中选择“断点”组,在详细信息视图中单击,Command-A,删除
  • 在组和文件树中显示断点智能组,在大纲中使用 shift 或命令选择断点,按 Delete
  • 运行>控制台,当应用程序暂停时,输入“删除断点”并按回车

回答by Suraj K Thomas

Xcode 10

Xcode 10

The most easiest way is to do ? + y to disable enable breakpoints .

最简单的方法是做什么?+ y 禁用启用断点。

There is another way

还有另一种方式

go to Xcode project navigations pane

Click on show Breakpoint navigator

转到 Xcode 项目导航窗格

单击显示断点导航器

enter image description here

在此处输入图片说明

Right click on the project file and select disable all break points

右键单击项目文件并选择禁用所有断点

enter image description here

在此处输入图片说明

回答by Guillermo Aguirre

In Xcode 9 it's CMD(?) + 8 to access all breakpoints, you can also just click here:

在 Xcode 9 中,它是 CMD(?) + 8 来访问所有断点,你也可以点击这里:

Sidebar when running the app

运行应用程序时的侧边栏

Then you can select and delete them.

然后您可以选择并删除它们。

回答by MarkPowell

Additionally, you can customize your Toolbar and put the "Breakpoints" button there. Click this on/off will active/deactivate all breakpoints. While this doesn't remove them, it may be useful if you just don't want them to be hit for a run.

此外,您可以自定义工具栏并将“断点”按钮放在那里。单击此开/关将激活/停用所有断点。虽然这不会删除它们,但如果您只是不希望它们在跑步时被击中,它可能会很有用。

回答by Mohd Sadham

For Xcode 5: In ToolBar, select Navigate-> select Reveal in Project Navigator-> In Navigator area, select Show the Breakpoint Navigator.

对于 Xcode 5:在 ToolBar 中,选择Navigate->在 Project Navigator 中选择Reveal-> 在Navigator area 中,选择Show the Breakpoint Navigator

Here, You can edit, hide/unhide, share, move the breakpoint for each and every class.

在这里,您可以编辑、隐藏/取消隐藏、共享、移动每个类的断点。

Note: Because of Xcode newbie's, am explained the steps from toolbar to show the Breakpoint Navigator.

注意:由于 Xcode 新手,我从工具栏解释了显示断点导航器的步骤。

回答by BoBro

As an addition to mxg 's answer above:

作为上述 mxg 答案的补充:

in Xcode 5 it's been changed to CMD(?) + 7

在 Xcode 5 中它已更改为 CMD(?) + 7