Visual Studio 2008 plays sound when debugging error

I have a long process (40 + min) that I am debugging. I do not want my workstation to focus on me while I'm debugging. I would like VS to be able to play sound if an exception occurs, to return my attention to my workstation so that I can solve the problem and move on.

Is it possible?

+4
source share
2 answers

With all the various events in the Sounds app of the control panel, I think this should be considered.

You just need to figure out which one will play in the message box that appears on the exception. Probably a Critical Stop.

On the sidelines, Visual Studio also adds the Breakpoint hit sound event, as well as build events.

+3
source

Well, you could do the righteous thing and add try / catch blocks to your code. Then, if an exception occurs, you can play the sound programmatically in the catch block. This will have the added benefit of providing real error handling in your APP.

0
source

Source: https://habr.com/ru/post/1300944/


All Articles