DevTools Tips

Play a sound when a line of JavaScript is executed

Categories: Supported by:

Sometimes pausing execution when a line of JavaScript is executed is too much, sometimes you only want to know that the line was executed at all, not pause there.

To do this you can add console.log() statements in your code, or use logpoints.

In Safari, you can play an audio beep instead! This way you can hear that the line got executed, and your console doesn't get cluttered with more messages.

To add an audio breakpoint:

And that's it! Now every time this line is executed, an audio beep will be played.

You can remove the breakpoint by right-clicking on it and selecting Delete Breakpoint.

GIF animation showing how to add the audio breakpoint in Safari Web Inspector