Usually, adding a lot of ‘todo’ comments is not a good idea because it will rarely be seen by others.
Hence we use #warning to throw a warning for our message when the developer compiles.
1 |
#warning add validation code |
If you want it to be an error:
1 |
#error fix your code |
Playing a sound using Breakpoint
You can also put sounds in your code by first adding a break point to where you want the sound to happen. Then:
Edit Breakpoint >> Action >> Sound >> choose a sound file.
Playing a sound is a good way to know if a certain code path has been reached without having to look through the logs. You can also provide your own custom sounds in case you want to play an explosion for a particular bad crash.
To do so, just drop your sound files in this folder:
YOUR_HOME_DIRECTORY/Library/Sounds