I have an Excel Add-In in .NET which sometimes crashes upon closing Excel.
The type of crash is “Has stopped working” that describes an exception in some unmanaged code or in non-daemon threads.
I am trying to understand what’s happening by inserting logging statement, however I would like to see more informations: the class of the caller, the time, the method and so on.
Is it feasible by using the .NET native logger or should I use a more complex logging library?
Most of the time when you encounter such error, a comprehensive error log is written in systems event log. you can check it out at event logs > application and see what is going wrong.
It will be of row nature though and will give you the name of faulting module and the stack trace.
So far as you are in managed domain, it is possible to debug using the JIT debugger but as soon as you proceed to native code, you will not be able to debug as that code is made in release mode and does not have sufficient debugging information. You might see the disassembly though using the debugger supplied with visual studio.