Custom Error Sounds
Get instant audio feedback for coding events.
Custom Error Sounds is a lightweight, developer-focused VS Code extension that plays specific audio cues whenever you make an error in your code. It's designed to increase productivity through instant feedback without being intrusive.
Features
- Distinct Error Sounds:
- Standard errors trigger a default sound (
faaa.mp3).
- "Undefined" or "Unexpected" type errors trigger a distinct alert (
wait-a-minute.mp3).
- Zero Distraction Audio Engine: Uses a secure, hidden Webview for audio playback without opening visual editor tabs.
- Smart Debouncing: Groups rapid diagnostic updates together so you aren't spammed with audio during large refactors.
- Customizable: Provide absolute paths to your own
.mp3 or .wav files via settings.
- Toggle Quickly: Use the Status Bar indicator (
🔊 ON / 🔇 OFF) to silence feedback during meetings.
How it works
When you type and a new diagnostic error appears (e.g. from TypeScript, ESLint, or Python), the extension reads the error message.
- If the message contains keywords like undefined, null, is not defined, or cannot read property, it plays the Undefined Error sound.
- Otherwise, it plays the Normal Error sound.
Settings
This extension contributes the following settings to VS Code:
errorSound.enabled (Boolean): Enable or disable all custom error sounds. (Default: true)
errorSound.volume (Number): Volume level for sounds, ranging from 0.0 to 1.0. (Default: 0.7)
errorSound.customErrorPath (String): Optional. Absolute path to a custom sound file for normal errors. (e.g., C:/sounds/bonk.mp3)
errorSound.customUndefinedPath (String): Optional. Absolute path to a custom sound file for undefined/unexpected errors.
Commands
Access these commands via the Command Palette (Ctrl+Shift+P / Cmd+Shift+P):
Error Sound: Toggle: Quickly toggle sounds ON or OFF.
Error Sound: Reload Audio Engine: Use this if the audio Webview gets stuck or stops playing sounds after a long session.
Adding Custom Sounds
- Find an
.mp3 or .wav file you want to use.
- Copy its absolute path on your system.
- Open VS Code Settings (
Ctrl+, / Cmd+,).
- Search for
errorSound.
- Paste the absolute path into the Custom Error Path or Custom Undefined Path fields.
- Trigger an error to test the sound!
Screenshots
(Placeholder for Screenshots)
Demo
(Placeholder for Demo GIF)
The audio engine uses a strict Content Security Policy (CSP) and plays elements natively through HTML5 <audio>, meaning it uses negligible CPU and RAM overhead compared to heavy extension features. No external binaries or heavy dependencies are required.
License
MIT License \u00a9 Custom Error Sounds