Can I view the unhandled exception in the Visual Studio 2017 debugger?
The library I am using (zmq) is throwing an exception. The debugger breaks and tells me.
How, if possible, can I see this exception. Specifically, what's the () message? Without having to wrap try / catch around it and print to the output stream.
- It does not appear in auto or locale watchlists. I was looking for stack frames around the point where it happened.
- Adding $ exception to the list of wrist watches simply returns "identifier $ exception is undefined"
- Using the memory explorer to poll for the location of the exception shows nothing useful.
I've read that it can be done using the CLR - can I do it in regular C ++?
source to share
(1) Make sure the exception messages have been enabled in the Output window under Tools-> Options-> Debugging-> Output.
(2) If the message is still not an exception, one possible reason is that zmq does not really support VS's Exception feature. Of course, you could write a generic application like C # or VC ++ that can prove this. If other apps don't have this problem, we would think of a specific zmq.
source to share
As far as I know, this is not currently possible. I've added a User Voice suggestion here , but I'm not sure when Microsoft will ever implement this feature.
Currently, what you can do is use the Exception Type and Location (from the post "Exception is selected in Address in Module : Microsoft C ++ Exception: Enter Location . ' Into memory location , and then add the expression' ( Type *) Location If Type is some internal type of exception that you do not have access to, you can hope that it will be retrieved from std :: exception and replaced with it.
source to share