Reputation: 425
I developed a small app used to synch data between a local computer and an online web service.
In the testing environment, using visual studios 2012 express debug mode, I'm not able to reproduce a bug that is causing the application to crash.
I've tried logging activity manually by writing data to .txt file to give me a frame of reference, but I still can not determine where this bug is occurring.
Are there any tools available for debugging this app while in production mode?
Upvotes: 3
Views: 2997
Reputation: 4793
Yeah, the problem could be related to environment or the version of the software your debugging is not the same as production. So what you ideally want is to debug the live version against the same source code version and debug symbol files.
There are numerous articles on the net regarding how to do this like this one and this one. I read one once that showed you how to not only setup a symbol server correctly with TFS but on how to debug an production exe and VS would load the correct symbols for that version from the symbol server and the source code version from TFS... but alas i cannot find it.
The remote debugging an logging is all great essential tools but when you're at the place you're at now - the right version of debug symbols and source code would probably help you more.
Upvotes: 0
Reputation: 25732
Simply use NBug library which can catch unhandled applications and send a bug report to an e-mail address that you specify.
Upvotes: 0
Reputation: 13354
If you can start a process on the remote production machine, the simplest thing to do in this kind of scenario is using the VS remote debugger.
This way you'll have a full debugging context with much more information than with simple logging; the debugging experience is (almost) the same as with local debugging.
It's a shame this tool is not widely known because it can literally save you hours or even days for tricky bugs.
Upvotes: 3
Reputation: 10452
We use Microsoft Enterprise Library to log and email the stacktrace to us any time an unhandled exception occurs.
Upvotes: 0
Reputation: 11166
Try logging stacktrace a.s.o. in AppDomain.UnhandledException event handler.
Furthermore it's possible to trace all function calls utilizing aspect oriented programming with PostSharp. There are examples on the PostSharp webpage.
Upvotes: 0