Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debug an application in production [closed]

Some weird bugs occur in production with our home-made application written in C# with the framework 3.5. The application is logless (I know...) and the crashes don't give us usable information even in the event viewer. Further more, the error handling is poor when it exists.

Checkout the code and hunt the problem in a dev environment is not the solution as we don't know what the problem is.

We'd like to "debug" the application in the production environment. We're dreaming about something like using a tool with the feature of Visual Studio Debugger and ILSpy. That's, making step by step execution with deassembled code.

Well, what are the solutions when we don't have logs or error handling to debug an application in production?

like image 636
JiBéDoublevé Avatar asked Jun 26 '12 14:06

JiBéDoublevé


1 Answers

See How to: Setup Remote Debugging

Edit: After seeing some of the responses to the main response, my suggestion continues with

  • Add more Try/Catch Blocks to the code.
  • Put in more check for null variables and lists
  • Put in more error handling. Do a divide and conquer strategy for this situation. Determine where the errors reside and start putting in error handling, logging and general plumbing to facilitate better code.

If you do those items the problem in question will be resolved; for you now have the tools to track down the error(s).

like image 106
ΩmegaMan Avatar answered Sep 28 '22 01:09

ΩmegaMan