New answers tagged debugging
If you are using visual studio ultimate to develop your feature IntelliTrace would be an option. IntelliTrace team done a great job to plugin SharePoint events with IntelliTrace .
You really shouldn't be debugging in production. Instead, add additional logging capabilities to your app and do more defensive coding. By defensive coding, I mean that if your code is calling some method to get an object, check to see if you got the object before doing anything with it.
Top 50 recent answers are included