More exactly -- how to do it in a standard way?
I like the way VS trace exceptions caused by my program, so when running it from VS it has no sense for me to use my own mechanism for handling and displaying exceptions. Of course when the program is executed as a standalone app, I have to rely on my piece of exception handler.
I know, I can define a parameter in VS to run the program, and this way recognize if this is VS run or not, but I was looking for something standard. Maybe VS sets one flag indicating this is VS run?