Play a sound when a line of JavaScript is executed

Help us make DevTools Tips better! Fill out this survey to tell us more about your DevTools habits and frustrations.

Categories: Supported by:

Play a sound when a line of JavaScript is executed

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.

Animation showing how to add the audio breakpoint in Safari Web Inspector.

See also