213

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

Nathan Koop
  • 24,803
  • 25
  • 90
  • 125
pratik
  • 4,419
  • 8
  • 41
  • 65

14 Answers14

351

Well there's a 3 step way:

  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 :)
mxg
  • 20,946
  • 12
  • 59
  • 80
  • 1
    In Xcode 4, this doesn't show or delete all breakpoints, just some of them. Try adding a breakpoint from the command line, and you'll see that it doesn't show up in this list. – James Moore Mar 07 '13 at 22:33
  • 3
    On xcode 4.6.3 just go to breeakpoints tab on the left panel, select all using shift+click and delete them using delete key – gerrytan Sep 26 '13 at 05:44
  • How about how to do it without a keyboard shortcut? Also, there isn't an alt key on Mac, so your Xcode 3 method isn't valid. and do you mean CMD 7 or CMD F7? – Neo42 Nov 29 '17 at 19:21
  • 1
    This answer is out of date. – Andrew Koster Sep 27 '18 at 23:32
129

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

Xcode 10 Screenshot:

enter image description here

Old Xcode Screenshot:

enter image description here tap. See attach image for clear reference.


iPhoneProcessor
  • 4,980
  • 6
  • 27
  • 49
  • @AndrewKoster Hey its same in Xcode 10 also...what's wrong ? Just Icon in screenshot look bit different...but works same in all Xcode – iPhoneProcessor Sep 29 '18 at 13:45
  • 1
    I guess my comment got deleted? Anyway, I reversed my downvote, this works. Looks like you posted new screenshots for people like me who are bad at understanding explanations. – Andrew Koster Oct 11 '18 at 20:29
  • @iPhoneProcessor Keyboard shortcuts can significantly speed up interaction with programs. Provided the program extensively supports keyboard shortcuts, you can usually navigate a lot further in the time it takes to reach for and move the mouse alone. It doesn't make life complex, I'd argue it does the exact opposite, especially if the shortcuts stay the same while the UI changes. It also saves time to find the button if you have no idea where it is, or the buttons are moved around after an update. – Zoe Aug 14 '19 at 21:57
23

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.

enter image description here

Nazik
  • 8,696
  • 27
  • 77
  • 123
  • This is out of date. – Andrew Koster Sep 27 '18 at 23:31
  • 1
    @AndrewKoster, even in the **latest Xcode 9.4**, it's working dude. Go to breakpoints tab, right click the project name, it'll show the above options including delete breakpoints. – Nazik Sep 28 '18 at 05:55
  • You're right, I glossed over the "on the breakpoints tab" part of your answer, because I never use the breakpoints tab and I don't think I was aware of its existence. I was just right-clicking on the project in the normal project view. – Andrew Koster Oct 11 '18 at 20:28
22

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

(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.

James Moore
  • 8,636
  • 5
  • 71
  • 90
  • 1
    Thanks! I was searching for the LLDB command for that, and I found your answer, which works perfectly in the terminal! +1!! – rmbianchi May 29 '19 at 06:41
14

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
cdespinosa
  • 20,661
  • 6
  • 33
  • 39
12

Xcode 10

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

There is another way

go to Xcode project navigations pane

Click on show Breakpoint navigator

enter image description here

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

enter image description here

Suraj K Thomas
  • 5,773
  • 4
  • 52
  • 64
8

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

Sidebar when running the app

Then you can select and delete them.

Guillermo Aguirre
  • 743
  • 1
  • 8
  • 16
6

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.

MarkPowell
  • 16,482
  • 7
  • 61
  • 77
5

For XCode 12.4

  1. Click on Debug in Toolbar
  2. Choose Breakpoints
  3. Then Click on Delete All Breakpoints

That's it!!

manoj kiran
  • 79
  • 1
  • 4
4

As an addition to mxg 's answer above:

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

BoBro
  • 108
  • 1
  • 5
4

For Xcode 5: In ToolBar, select Navigate -> select Reveal in Project Navigator -> In Navigator area, select 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.

Mohd Sadham
  • 435
  • 3
  • 19
4

For XCode 12:

  1. Press CMD ⌘ + 8

  2. Select All (CMD ⌘ + A)

  3. Right Click and Select "Delete Breakpoints"

oğuz
  • 145
  • 1
  • 13
1

CMD(⌘) + a
CMD(⌘) + /
CMD(⌘) + /

ChrisSannar
  • 141
  • 1
  • 5
0

In XCode 7 you can just drag a bp into the project view window and an X will appear, release mouse and it will be deleted.

Mike Purcell
  • 19,847
  • 10
  • 52
  • 89