开发者

Deleting breakpoints in Xcode

There are some brea开发者_开发问答kpoints in my project that for some reason can not be turned off or deleted. How can I delete these? I heard that they can be deleted by deleting a file with the extension .dsk, but I can't find that file. Where is it?


There are 4 solutions i have provided which you can try. Sometimes all you need to do is click and drag the breakpoint one by one in your project and drag it off the screen. If that doesn't work try these options. At least one will definitely work.

Solution 1: Or the more better solution would be to turn the breakpoints off. There is a button on the top bar where the build and run button is located; on the left of it, there is a breakpoints button an image of an arrow pointing to the right is on the button. thats the button you want to click to activate/deactivate breakpoints in your project.

Deleting breakpoints in Xcode

EDIT: Further explanation

Solution 2: If you want to delete some break points that you dont need you locate the breakpoints in your project and then click and hold on the specific breakpoint you want to get rid off, then you drag it off the sidebar; you will see your cursor change to a scrunched up paper ball, to let you know that if you let go then your object that is being held by the mouse (in this case a breakpoint) will be deleted.

Deleting breakpoints in Xcode

Solution 3: Another way of deleting a break point is by right clicking on the specific breakpoint you want deleted and click on the menu option: remove breakpoint.

Deleting breakpoints in Xcode

Solution 4: If you want access to the place where all break points are stored, you right click on the breakpoint in the sidebar, click on 'Reveal in Break points':

Deleting breakpoints in Xcode

Then a screen appears which displays all break points, and from here you ahve full control over the brakpoints, where you can select the break point and delete it from the file.

Deleting breakpoints in Xcode

I believe this is what you wanted.

PK


I had a seemingly "invisible" breakpoint that couldn't be removed. The line where the break occurred was missing the usual pointy blue visual indication of an active or disabled breakpoint, so there was nothing there to drag out or right click in the usual way. This sounds like what has happend to z-buffer.

It turns out the breakpoint was set in commented code that had been collapsed in the editor, but was breaking the flow at an unrelated and uncommented line further down. The commented code had multiple /* */ blocks embedded within one another, and I think this may have confused Xcode into setting the breakpoint at different line than the one marked on screen. Xcode 4.1 would sometimes freeze when debugging with the strange breakpoint.

I was able to gather from this post that CMD(⌘)+ALT+B or CMD(⌘)+6 in Xcode 4+ will bring up all the breakpoints in the project for easy removal. This helped me to quickly find and disable these "invisible" breakpoints.


Using a developer preview version of Xcode 5, I had some bad breakpoints that could not be deleted in the breakpoints window. Going into the .xcodeproj and removing the Breakpoints.xcbkptlist (and a Breakpoint_v2.xcbkptlist) files in xcshareddata/xcdebugger and xcuserdata/me.xcuserdatad/xcdebugger directory deleted all breakpoints for me.


For Xcode 4 & 5: just click the "breakpoints" tab on the left side, select all breakpoints and delete.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜