title: Detecting if a program was run by Visual Studio, as opposed to run from Windows Explorer
body: <p>Is there a way to detect if your program was loaded through Visual Studio vs. whether it was started as a standalone executable?</p>
  
  <p>Our software has a bug reporting feature to handle unhandled exceptions -- we need to be able to distribute debug builds to our beta testers, but we don't want the bug report to go off when we are in the middle of development, because the Exceptions are a lot more useful if VS catches them with a full stack trace, etc.</p>
  
  <p>Right now, I'm disabling the bug report if <code>Application.ExecutablePath</code> includes bin\Debug or bin\Release, but I figure there is probably a more robust way of detecting whether the program was loaded through VS.</p>
  
  <p>Obviously, we could set up a different build with some preprocessor macros, but for the sake of the question, assume that isn't a possibility -- I don't mind adding code, but I'm trying to make the fewest modifications to the build process, which is why command-line options are kind of a last resort as well.</p>
  
  <p>If it matters, I'm using VS2003/.NET 1.1.</p>