Is there any way to copy-paste breakpoints in Xcode?
The reason I am asking is, I have a breakpoint set to "automatically continue after evaluating", with some actions associated. I want to have the same breakpoint behavior/action in multiple places in the code. Instead of re-doing it (Setting breakpoint, customizing it) 10 times (or even more which can be cumbersome), just copy-paste it!?
Navigate to a line in your code where you want execution to pause, then click the gutter or line number in the source editor to set a breakpoint. Xcode displays a breakpoint icon to indicate the location. Drag a breakpoint up or down to move it to another location; drag it away from the gutter to remove it.
You might be pushing "Run" instead of "Debug" in which case your program is not running with the help of gdb, in which case you cannot expect breakpoints to work! In Xcode 6.4, there is now only a Run button and whether it runs a debug configuration or not depends on the currently selected scheme settings.
When you run an application in Xcode, the debugger is automatically started and attached to the process of the application. Click the Run button in the top left or press Command + R. From the moment the application is up and running, we can start inspecting the process and, if necessary, debug it.
When your app pauses at a breakpoint, hover over a variable in your source code to view its current value. If the variable is an image or other type that isn't expressible as text, click the Quick Look button at the upper-right to see a preview of the variable.
I've found a solution, though it might not be easier. All of the breakpoints are saved in an XML file inside your Xcode project. To find the file, select your project file and choose "Show Package Contents", then go to:
xcuserdata/(YourNameHere).xcuserdatad/xcdebugger/
You can open the breakpoints file and copy /paste their XML. You can then change the file and line numbers of the breakpoints.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With