Visual Studio 2008 play sound on error while debugging
I have a long running process (40+ min) that I am debugging. I don't want to have to give my workstation my full attention whi开发者_StackOverflow社区le I'm debugging. I'd like if VS could play a sound if an exception occurs to pull my attention back to my workstation so I can resolve the issue and move on.
Is this possible?
With all the different events in the Sounds applet of the Control Panel, I think this should be covered.
You just need to figure out which one will get played for the message box that pops up on an exception. Probably "Critical Stop."
As an aside, Visual Studio also adds a "Breakpoint hit" sound event in there, too, as well as events having to do with a build.
Well, you could do the righteous thing and add try/catch blocks to your code. Then, if an exception occurs, you could play a sound programmatically in the catch block. This will have the additional benefit of leading to real error handling in your APP.
精彩评论