title: How do I debug a console app that seems to exit immediately on startup?
body: <p>I have a console app that polls a POP3 server, and the very first thing it does is connect and log on. That takes maybe about one second normally. The application works find on my dev machine, but when I deploy it to the staging box, when I try and run it, all I see is a millisecond flash of a console window, and it exits.</p>
  
  <p>I have added an <code>UnhandledException</code> handler to the <code>Program</code> class of the app that will hopefully tell me more (I can only tell when it's redeployed, a smallish process), but is there any source of error info outside of the app itself, like somewhere in Windows tracing or the error log. The Windows logs on the staging machine are huge, and I don't quite know what to look for or where to look.</p>