Erik Ramsgaard Wognsen

Thoughts & technology

Visual Studio Sounds

I have been working with a slightly heavy C# code base that takes around a minute to build and start up. This is enough time that I’ll switch to another program each time I start a debug or test run. But it’s also short enough time that if I get side­tracked for five minutes, that’s four minutes of Visual Studio sitting idle.

One day I stumbled upon a setting in Visual Studio named “Play a sound when tests finish running”, and from there a button to open the main Windows Sound settings where a number of events in Visual Studio can be configured to trigger a sound. This feature is as simple but great. Now I can switch context and always hear when I need to come back and work from a breakpoint or a finished test run. I can also use different sounds to distinguish positive and negative outcomes. Using the built-in Windows sounds, I found that these work great:

Event Sound
Breakpoint Hit Windows Pop-up Blocked.wav
Build Failed Windows Hardware Fail.wav
Build Succeeded Windows Print complete.wav
Test Run Failed Windows Hardware Fail.wav
Test Run Succeeded tada.wav


Especially the Ta-Daaa! fanfare when the tests pass is a nice way to be called back to Visual Studio. Happy coding!

Comments