7

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?

greenoldman
  • 16,895
  • 26
  • 119
  • 185
  • Maybe you are looking for debug/release mode - http://stackoverflow.com/questions/654450/programatically-detecting-release-debug-mode-net – KV Prajapati Aug 25 '10 at 06:24
  • 1
    No, you can run program in debug or release both in VS run and non-VS run. Those modes are independent debug/release<->VS-run. – greenoldman Aug 25 '10 at 06:35
  • 1
    Check out [Changing the program flow when running under a debugger](https://stackoverflow.com/questions/1330452/changing-the-program-flow-when-running-under-a-debugger) – Will A Aug 25 '10 at 06:22
  • You are fast :-) Thank you very much. – greenoldman Aug 25 '10 at 06:34

0 Answers0