Error Sound AlertAutomatically plays the legendary “fahhh” whenever your terminal throws an error, so every failed build comes with the emotional damage it truly deserves. NEW: Success and Emotional Damage sounds added as per user feedback NOTE: Success sound effect is purely organic and made by Muhammad Basil P V. Grateful to him for the idea too. Features
Installation
UsageBasic SetupThe extension activates automatically when VSCode opens. By default, it will:
Commands
Status BarUse the Run With Sound status bar button to run the configured or auto-detected command without opening the command palette. ConfigurationConfigure the extension via VSCode Settings (
|
| Platform | Built-in Sound | Custom Audio |
|---|---|---|
| Windows | ✅ Yes | ✅ Yes |
| macOS | ✅ Yes | ✅ Yes |
| Linux | ✅ Yes | ✅ Yes |
Detecting Compiler Errors (C/C++, Java, etc.)
For the extension to detect compiler errors from terminal builds, you can either use the Run Command With Sound command, set a default command for automatic runs, or set up a build task with a problem matcher. The sound triggers when the task exits with a non-zero code and diagnostics are produced.
Auto-detection looks for common project files (like package.json, pom.xml, build.gradle, Cargo.toml, go.mod, or Makefile) and active file types (C/C++, Python, Java, JavaScript) to set a reasonable default command.
C/C++ Example
Create or edit .vscode/tasks.json:
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "gcc",
"args": ["-g", "${file}", "-o", "${workspaceFolder}/a.out"],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": "$gcc"
}
]
}
Then run Ctrl+Shift+B to build - when errors appear in the Problems panel, the sound will play!
How It Works
- You create a build task (above example compiles with
gcc) - VSCode's problem matcher captures compiler errors into the Problems panel
- The extension detects new errors and plays the sound
- The sound only plays once per error (not repeatedly)
Configuration Examples
Use a custom alert sound
{
"errorSoundAlert.soundFile": "${workspaceFolder}/sounds/alert.wav",
"errorSoundAlert.volume": 0.8
}
Disable on terminal errors but keep diagnostics alerts
{
"errorSoundAlert.playOnDiagnostics": true,
"errorSoundAlert.playOnTerminalError": false
}
Only play sounds at low volume
{
"errorSoundAlert.volume": 0.3
}
Troubleshooting
Sound doesn't play on Windows
- Ensure your system volume is not muted
- Check that audio output device is connected
- Verify file path is correct in settings
Sound doesn't play on macOS
- Make sure audio output is not muted
- Try using a different audio file format
Sound doesn't play on Linux
- Install
pulseaudiooralsa:sudo apt-get install pulseaudio - Or use
paplay,aplaycommand line tools
Tips
- Test the extension - Use the "Play Test Sound" command to verify audio is working before relying on automatic alerts
- Custom sounds - Place audio files in your project's sounds directory for non-absolute paths
- Performance - The extension has minimal performance impact as it only listens to error events
Future Enhancements
- [ ] Multiple sounds for different error types
- [ ] Configurable sound for warnings vs. errors
- [ ] Terminal exit code detection
- [ ] Sound intensity based on error severity
License
MIT