Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Rag-Korla Error SoundNew to Visual Studio Code? Get it now.
Rag-Korla Error Sound

Rag-Korla Error Sound

Likhon Mondol

|
12 installs
| (0) | Free
Plays a sound whenever VS Code detects errors or warnings in your code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

🔊 Diagnostic Sound Alert

A VS Code extension that plays a sound whenever errors or warnings are detected in your code.

  • 🔴 error.mp3 — plays when syntax errors or problems are found
  • 🟡 warning.mp3 — plays when warnings appear (and no errors are present)

🚀 Installation (Development / F5 Mode)

Step 1 – Prerequisites

Make sure you have the following installed:

  • Node.js (v16 or newer)
  • VS Code
  • (Optional, for packaging) vsce:
    npm install -g @vscode/vsce
    

Step 2 – Clone / Copy the Extension Folder

Place the diagnostic-sound-alert/ folder anywhere on your machine.

Step 3 – Add Your Sound Files

Put your MP3 files inside assets/sounds/:

assets/sounds/error.mp3
assets/sounds/warning.mp3

⚠️ The filenames must be exactly error.mp3 and warning.mp3.

Step 4 – Open in VS Code

cd diagnostic-sound-alert
code .

Step 5 – Run with F5

  1. Press F5 (or go to Run → Start Debugging)
  2. A new Extension Development Host window opens
  3. Open any file with code — intentionally introduce an error or warning
  4. 🎵 The sound should play!

🎵 How to Replace Sound Files

  1. Find your desired .mp3 sound files
  2. Rename them:
    • error.mp3 for errors
    • warning.mp3 for warnings
  3. Drop them into assets/sounds/, replacing the existing files
  4. Restart the extension (press F5 again, or reload the Extension Host window)

The extension reads the sound files at runtime, so no recompile is needed — just replace and reload.


⚙️ Settings

Open VS Code Settings (Ctrl+,) and search for "Diagnostic Sound Alert":

Setting Default Description
diagnosticSoundAlert.enabled true Enable/disable all sounds globally
diagnosticSoundAlert.volume 0.8 Volume: 0.0 (silent) → 1.0 (full)
diagnosticSoundAlert.showNotifications true Show status bar messages
diagnosticSoundAlert.cooldownMs 2000 Min ms between sounds (anti-spam)
diagnosticSoundAlert.playErrorSound true Play sound for errors
diagnosticSoundAlert.playWarningSound true Play sound for warnings

Or edit settings.json directly:

{
  "diagnosticSoundAlert.enabled": true,
  "diagnosticSoundAlert.volume": 0.8,
  "diagnosticSoundAlert.showNotifications": true,
  "diagnosticSoundAlert.cooldownMs": 2000,
  "diagnosticSoundAlert.playErrorSound": true,
  "diagnosticSoundAlert.playWarningSound": true
}

🖥️ Commands

Open the Command Palette (Ctrl+Shift+P) and type:

Command Description
Diagnostic Sound Alert: Toggle On/Off Enable or disable the extension
Diagnostic Sound Alert: Test Error Sound Preview the error sound
Diagnostic Sound Alert: Test Warning Sound Preview the warning sound

You can also click the 🔔 Sound button in the status bar (bottom right) to toggle.


📦 Package as .vsix (for sharing/installing)

# Inside the extension folder
npm install
vsce package

This creates a diagnostic-sound-alert-1.0.0.vsix file.

To install it in VS Code:

code --install-extension diagnostic-sound-alert-1.0.0.vsix

Or via VS Code UI:

  1. Ctrl+Shift+P → Extensions: Install from VSIX...
  2. Select the .vsix file

🪟 Platform Support

Platform Status Method
Windows ✅ Full PowerShell + System.Windows.Media.MediaPlayer
macOS ✅ Full afplay (built-in)
Linux ✅ Partial mpg123 or paplay (must be installed)

🛠️ Troubleshooting

No sound plays on Windows?

  • Make sure the MP3 files exist in assets/sounds/
  • Open PowerShell and test manually:
    Add-Type -AssemblyName presentationCore
    $p = New-Object System.Windows.Media.MediaPlayer
    $p.Open([System.Uri]'C:\full\path\to\error.mp3')
    $p.Play()
    Start-Sleep 3
    

Sound plays but I don't hear it?

  • Check that diagnosticSoundAlert.volume is not 0
  • Check Windows volume mixer — VS Code might be muted

Test commands work but real diagnostics don't trigger sound?

  • The cooldown (cooldownMs) may be too long — try lowering it in settings
  • Make sure the language extension (e.g., ESLint, Pylance) is publishing diagnostics

📝 License

MIT — free to use, modify, and distribute.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft