Pimp your XCode: Add sound to breakpoints
Here’s a neat little trick I’ve come across recently that I find very useful – In XCode, under the “breakpoints” navigator, you can configure an existing breakpoint to play a sound once it is hit. This means that the app doesn’t necessarily have to pause execution so that you know what’s going on. Also, using this in collaboration with some other advanced debugging features may prove to be even more powerful (I recommend WWDC session 412 for some good quality learning).
All you have to do is:
1. Add your breakpoint and open the breakpoint navigator to find it there.
2. Hold alt+cmd while clicking the relevant breakpoint. You’ll see a popup like so:
3. Press the “Add Action” button – you’ll now see the “Action” section change so that you can select a type of action – pick “Sound”
4. You can either choose a different sound than the default one (maybe a sound of something breaking?) or just leave the default sound as is. It’s also recommended that you tick the “Automatically continue after evaluating” checkbox so that the sound will play without pausing your app.
And there you have it – breakpoints with sound! I must say I haven’t seen this in any other IDE. Kudos to Apple.