BugBeats
BugBeats is a fun and creative Visual Studio Code (VS Code) extension designed to lighten the mood during coding sessions. It plays Spotify tracks based on the outcome of your code execution—celebrate your successes and laugh off your bugs with some beats! Whether you're smashing through error-free runs or dealing with frustrating bugs, BugBeats will add some rhythm to your debugging journey.
Features
- Run and Check Code: Execute your code in the active editor and analyze the results.
- Play Bug Tunes: When an error occurs, BugBeats detects the error type and plays a corresponding Spotify track.
- Celebrate Success: When your code runs successfully, enjoy a celebratory tune.
- Error-Specific Tracks: Different error types (e.g., SyntaxError, IndexError, TypeError) are mapped to unique Spotify tracks.
- Stop Playback: Quickly stop the music with a single click.
- Auto Spotify Integration: Seamlessly connect with Spotify to start playback directly.
Requirements
- Spotify Premium Account: Required for playback control via Spotify API.
- VS Code: Latest version recommended.
How To Use It
- Download the extension from the marketplace and once it is enabled, it will automatically take you to the login page to connect with your Spotify. (If it doesn't take you to the login page, try reloading the VSCode window. You can do that by pressing Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (Mac) to open the command palette, then type and select Developer: Reload Window).
- Once connected, you are ready to go! Just make sure your Spotify device is active, you can do that by going to your Spotify app (web or mobile) and just press play on any song (you can pause it instantly after pressing play) so that the extension can recognize your active device.
- Start coding in whatever language you want and click the Run and Check button at the bottom left of your screen when you wanna run and test your code.
- BugBeats will detect your code for errors, and will play a specific song based on whether your code ran successfully or not.
- Although, the songs do have a set time limit and automatically stop after a few seconds, you can also manually stop them by clicking the Stop Playback button which is to the right of the Run and Check button.
Help
If the extension stops working or is facing any issues, try reloading the VSCode window and running it again. You can do that by pressing Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (Mac) to open the command palette, then type and select Developer: Reload Window. It should work after that.
If the issue still isn't resolved, make sure your Spotify device is active. Go over to your Spotify app and press play on any song (you can pause it instantly after pressing play) so that the extension can recognize your active device.
If you have any questions or concerns regarding the extension, be sure to check out the demo video I posted on my LinkedIn. Also feel free to connect with me and ask me if you are facing any issues, and I will happily resolve them for you.
Here's our GitHub if you wanna look at our source code!
Contributors
Made by Chirag Seth and Yajat Mehta, students at Arizona State University.
Enjoy!