Err Sound 🔊
Play fun sound effects for coding errors and successful runs!
Err Sound is a Visual Studio Code extension that makes your coding experience more engaging by playing different sound effects based on your code's status:
- 🔴 Error sounds when syntax, runtime, or type errors occur
- ✅ Success sounds when your code runs without errors
- 🎵 Cooldown system to prevent sound spam
Features ✨
1. Error Detection While Typing
- Monitors code diagnostics in real-time
- Plays error sounds immediately when issues appear
- Analyzes error types and plays appropriate sounds:
- Syntax Errors → syntax-error.mp3
- Reference/Type Errors → runtime-error.mp3
- Null/Undefined Errors → faah.mp3
2. Runtime Error Detection
- Listens to terminal output for runtime errors
- Detects keywords:
Error, Exception, Traceback, Compilation failed
- Plays runtime-error.mp3 when errors are detected
- Shows notification with error details
3. Success Sound
- Detects successful program execution
- Plays success.mp3 with celebratory message
- Shows: "Niccee brooo 😎"
4. Multi-Language Support
- Python
- Java
- JavaScript / Node.js
- TypeScript
- C / C++
- HTML / CSS
- And more!
5. Configurable Settings
- Enable/Disable typing error sounds
- Enable/Disable runtime error sounds
- Enable/Disable success sounds
- Toggle notifications on/off
- Adjust volume (0.0 - 1.0)
- Set cooldown timer (prevents spam)
6. Test Commands
Err Sound: Test Error Sound - Test error sounds
Err Sound: Test Success Sound - Test success sounds
Err Sound: Toggle Err Sound - Enable/disable the extension
Installation 📦
From the VS Code Marketplace (Coming Soon)
- Open VS Code
- Go to Extensions (
Ctrl+Shift+X / Cmd+Shift+X)
- Search for "Err Sound"
- Click Install
Development Installation
- Clone the repository:
git clone https://github.com/SohailKhan0525/Err-Sound.git
cd Err-Sound
- Install dependencies:
npm install
- Open in VS Code:
code .
- Press
F5 to launch the Extension Development Host
Configuration ⚙️
Open settings and search for "Err Sound" or edit settings.json:
{
"errSound.enableTypingSound": true,
"errSound.enableRuntimeSound": true,
"errSound.enableSuccessSound": true,
"errSound.enableNotifications": true,
"errSound.soundVolume": 0.5,
"errSound.errorCooldownMs": 2000
}
Settings Reference
| Setting |
Type |
Default |
Description |
errSound.enableTypingSound |
boolean |
true |
Play sound when typing errors detected |
errSound.enableRuntimeSound |
boolean |
true |
Play sound when runtime errors detected |
errSound.enableSuccessSound |
boolean |
true |
Play sound when code runs successfully |
errSound.enableNotifications |
boolean |
true |
Show notification popups |
errSound.soundVolume |
number |
0.5 |
Volume level (0.0 - 1.0) |
errSound.errorCooldownMs |
number |
2000 |
Cooldown between sounds (milliseconds) |
Sound Files 🎵
The extension includes these sound effects (located in /media/):
- syntax-error.mp3 - Plays for syntax errors
- runtime-error.mp3 - Plays for runtime/type errors
- typing-error.mp3 - Plays for errors while typing
- success.mp3 - Plays when code runs successfully
- faah.mp3 - Plays for null/undefined errors
To replace sound files:
- Place your custom MP3 files in the
/media/ folder
- Keep the same filenames
- Reload the extension (Ctrl+Shift+P → "Developer: Reload Window")
Usage 🚀
Automatic Detection
The extension works automatically once activated:
- Typing - Errors are detected in real-time via VS Code diagnostics
- Terminal - Output is monitored for runtime errors and success indicators
- Sounds Play - Appropriate sound effects play based on detected events
Manual Testing
Press Ctrl+Shift+P (or Cmd+Shift+P on Mac) and run:
Err Sound: Test Error Sound - Play an error sound
Err Sound: Test Success Sound - Play a success sound
Err Sound: Toggle Err Sound - Enable/disable the extension
Example Workflows
JavaScript/Node.js
// Error detected while typing
const x = undefined.property; // ❌ typing-error.mp3 plays
// In terminal
$ node app.js
TypeError: Cannot read property 'property' of undefined // 🔴 runtime-error.mp3 plays
// Successful run
$ node app.js
Server running on port 3000 // ✅ success.mp3 plays
Python
# Syntax error
def hello( # ❌ syntax-error.mp3 plays
# Runtime error in terminal
$ python app.py
NameError: name 'x' is not defined # 🔴 runtime-error.mp3 plays
# Successful run
$ python app.py
Hello, World! # ✅ success.mp3 plays
Project Structure 📁
Err-Sound/
├── src/
│ └── extension.ts # Main extension code
├── media/
│ ├── syntax-error.mp3
│ ├── runtime-error.mp3
│ ├── typing-error.mp3
│ ├── success.mp3
│ └── faah.mp3
├── .vscode/
│ ├── launch.json # Debug configuration
│ └── tasks.json # Build tasks
├── package.json # Extension manifest
├── tsconfig.json # TypeScript configuration
├── .gitignore
└── README.md
Development 🛠️
Build
# Compile TypeScript
npm run compile
# Watch mode (auto-compile on changes)
npm run esbuild-watch
# Build for production
npm run vscode:prepublish
Testing
Press F5 in VS Code
- Opens Extension Development Host with your extension
- Edit
src/extension.ts and the Extension Host will reload automatically
Or run tasks manually:
npm run esbuild-watch
Then press F5 to start debugging
Debugging
- Set breakpoints in
src/extension.ts
- Use the Debug Console to inspect variables
- View logs in the "Err Sound" Output Channel (View → Output)
Publishing to VS Code Marketplace 🎉
Prerequisites
- VS Code account
- Personal Access Token (PAT) from dev.azure.com
Steps
- Install VSCE (VS Code Extension CLI):
npm install -g vsce
- Package the extension:
vsce package
This creates err-sound-0.1.0.vsix
- Login to Marketplace:
vsce login SohailKhan0525
# Enter your PAT when prompted
- Publish:
vsce publish
- Verify - Visit VS Code Marketplace and search for your extension
Create an Azure DevOps Token
- Go to dev.azure.com
- Personal Access Tokens → New Token
- Scopes:
Marketplace (Manage)
- Copy the token and use with
vsce login
GitHub Setup 📝
The project is ready for GitHub:
# Initialize git (if not already done)
git init
# Add all files
git add .
# Initial commit
git commit -m "Initial commit - Err Sound VSCode extension"
# Rename branch to main
git branch -M main
# Add remote (replace with your repo URL)
git remote add origin https://github.com/SohailKhan0525/Err-Sound.git
# Push to GitHub
git push -u origin main
Ignores: node_modules/, out/, dist/, *.vsix, .vscode/
API Reference 📚
Core Functions
playSound(soundType: SoundType, context: vscode.ExtensionContext)
Plays a sound with cooldown protection.
Parameters:
soundType: 'syntax-error' | 'runtime-error' | 'typing-error' | 'success' | 'faah'
context: VS Code extension context
showNotification(message: string, type?: 'info' | 'warning' | 'error')
Shows a notification popup (respects user settings).
toggleExtension()
Enables/disables the extension.
Troubleshooting 🔧
Sounds Not Playing
- Check settings:
errSound.enableTypingSound etc.
- Verify volume:
errSound.soundVolume > 0
- Check Output Channel: View → Output → "Err Sound"
- Ensure sound files exist in
/media/
Extension Not Activating
- Open Command Palette:
Ctrl+Shift+P
- Run "Developer: Reload Window"
- Check that extension version is installed
Logs
All events are logged in the "Err Sound" output channel:
- View → Output → Select "Err Sound" from dropdown
- Extension activation messages
- Error detection logs
- Sound play events
Requirements 📋
- VS Code 1.75 or higher
- Node.js 14+ (for development)
- npm or yarn
Dependencies
- play-sound - Cross-platform audio playback
- TypeScript - Language (dev)
- esbuild - Bundler (dev)
License 📄
MIT License - See LICENSE file for details
Contributing 🤝
Contributions welcome!
- Report bugs via GitHub Issues
- Submit PRs for improvements
- Suggest new sound effects
Support ❤️
If you find this extension useful, please:
- ⭐ Star the repository
- 📝 Leave a review on the Marketplace
- 🐛 Report issues you find
- 💡 Suggest new features
Roadmap 🗺️
Planned features:
- [ ] Custom sound upload support
- [ ] Error history/statistics
- [ ] Desktop notifications for background runs
- [ ] Integration with popular frameworks (React, Angular, etc.)
- [ ] Sound themes (different audio packs)
- [ ] Webhook support for CI/CD pipelines
- [ ] Morse code error patterns 🔊
Changelog 📅
v0.1.0 (Initial Release)
- ✨ Diagnostic error detection
- ✨ Terminal runtime error detection
- ✨ Success sound on clean runs
- ✨ Multi-language error support
- ✨ Configurable cooldown system
- ✨ Test commands
- ✨ Volume and notification settings
Made with 🎵 by SohailKhan0525
Questions? Open an issue on GitHub!