Packaging the Extension
To package and install the extension:
Install vsce (VS Code Extension Manager):
npm install -g @vscode/vsce
Package the extension:
vsce package
Install the .vsix file:
- Open VS Code
- Go to Extensions (
Ctrl+Shift+X)
- Click the "..." menu → "Install from VSIX"
- Select the generated
.vsix file
Publishing (Optional)
To publish to the VS Code Marketplace:
- Create a publisher account at https://marketplace.visualstudio.com/
- Update
publisher in package.json
- Run:
vsce publish
How It Works
- The extension monitors all terminal output using VS Code's
onDidWriteTerminalData event
- When terminal data is written, it checks against configured error patterns
- If an error pattern is matched, it plays the sound file
- The sound is played using system audio players (platform-specific)
Troubleshooting
Sound not playing?
- Check the sound file exists: Make sure
sounds/faah.mp3 exists
- Test the sound: Use the "Faah Sound: Test Sound" command
- Check audio player: Ensure you have a compatible audio player installed (see requirements)
- Check system volume: Make sure your system volume is not muted
- Check extension logs: Open Output panel → select "Faah Sound Error"
Too many false positives?
Adjust the faahSoundError.errorPatterns setting to be more specific to your needs.
Sound too loud/quiet?
Adjust the faahSoundError.volume setting (0.0 to 1.0).
Development
Project Structure
Faah extension/
├── extension.js # Main extension code
├── package.json # Extension manifest
├── sounds/
│ ├── faah.mp3 # Your sound file
│ └── README.txt # Instructions
└── README.md # This file
Testing
- Open the extension folder in VS Code
- Press
F5 to start debugging
- Test in the Extension Development Host window
License
MIT License - Feel free to use and modify!
Contributing
Contributions are welcome! Feel free to:
- Add new features
- Improve error detection
- Add support for more audio formats
- Report bugs or issues
Changelog
1.1.1
- Fixed: Added
terminalDataWriteEvent to API proposals to resolve activation error
- Fixed: Extension now properly declares all required proposed APIs
- Improved: Better compatibility with VS Code stable releases
1.1.0
- New: Windows support added! Now works on Windows, macOS, and Linux
- New: Includes WAV audio file for Windows compatibility (PowerShell SoundPlayer requires WAV format)
- Improved: Automatically selects correct audio format based on platform (MP3 for Linux/Mac, WAV for Windows)
- Fixed: Resolved audio playback issues on Windows systems
1.0.0
- Initial release
- Terminal error detection
- Configurable error patterns
- Volume control
- Toggle command
- Test sound command
Made with ❤️ for developers who want audible error notifications!
| |