title: Why does my application crash in release mode but not in debug mode?
body: <p>What is the difference between release mode and debug mode?</p>
  
  <p>And how can I debug in release mode to see whats failing?</p>
  
  <pre><code>class Program
  {
      [STAThread]
      static void Main()
      {
          try
          {
              Application.EnableVisualStyles();
              Application.SetCompatibleTextRenderingDefault(false);
              Application.Run(new MainWindow());
          }
          catch (Exception ex)
          {
              Logger.Error("Main : "+ex.Message, typeof(Program));
              MessageBox.Show(ex.Message + ex.StackTrace);
              Environment.Exit(1);
          }
      }
  }
  </code></pre>