Click here to Skip to main content
15,868,141 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
A colleague of mine (on a mac) has some code which can hijack the "throw" in order to produce a stack trace at the point the exception is thrown.

I was wondering if there were some pre-built stuff for windows to accomplish the same?
Posted

 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 21-Jun-11 16:39pm    
Pretty good short article, useful, my 5.
--SA
I don't know if this will help you, but you can make the VS debugger break when an exception is thrown. In the Debug -> Exceptions Dialog, you can select which exceptions to handle this way.

This obviously only works when debugging. If you want to be able to trace to a log file, follow Mr Pallini's link.
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 21-Jun-11 16:40pm    
Agree, my 5. It depends on why it is needed. For debugging, the stack trace shown by the debugger is very convenient. On can jump to the source code lines from the items of stack trace.
--SA
Peter Weyzen 21-Jun-11 17:32pm    
totally looking for something I can use in production software... stuff that doesn't require a debugger, and stuff that has no predefined failcase.

We have a situation where sqlite is throwing some exceptions in production software, and we'd like access to that information.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900