This VS Code extension plays a custom MP3 sound whenever there are compilation or linting errors in your code, and now shows the first detected error that triggered the alert.
Installation
Download the code-break-alarm-1.1.0.vsix file
Open VS Code
Go to Extensions (Ctrl+Shift+X)
Click the ... menu (top right)
Select "Install from VSIX..."
Choose the downloaded .vsix file
Features
Automatically detects when your code has errors (diagnostics with Error severity)
Plays a custom MP3 sound automatically to alert you
Shows the first file and error message that triggered the alarm
Includes a bundled extension icon
Supports audio playback on Windows, macOS, and Linux
Requirements
VS Code 1.118.0 or higher
An MP3 file named alert.mp3 in the media/ folder (you can replace it with your own sound)
Extension Settings
This extension contributes the following settings:
codeBreakAlarm.enabled: Enable/disable the code break alarm (default: true).
codeBreakAlarm.soundFile: The name of the MP3 file in the media folder to play (default: alert.mp3).
How it works
The extension listens to VS Code's diagnostics changes. When any file in the workspace has diagnostics with Error severity, it captures the first error, shows its file/message, and plays the alarm sound.
Customization
To use your own sound:
Replace the media/alert.mp3 file with your custom MP3
Make sure it's named alert.mp3
Known Issues
The sound plays every time diagnostics change and there are errors, which might be frequent during typing
Only supports MP3 format
Linux playback depends on paplay, aplay, or ffplay being available on the machine
Release Notes
1.1.0
Adds first-error details, cross-platform audio support, and stronger extension branding.
Following extension guidelines
Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension.