www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.debugger - first chance exception in VisualD

reply frame <frame86 live.com> writes:
Are first chance exception breakpoints throwing by assert() 
working in VisualD? I have core.exceptions.AssertError enabled 
but it slips through. I fancied that it worked some time ago. Not 
sure what happend.
Jul 28 2021
parent reply Rainer Schuetze <r.sagitario gmx.de> writes:
On 28/07/2021 11:37, frame wrote:
 Are first chance exception breakpoints throwing by assert() working in
 VisualD? I have core.exceptions.AssertError enabled but it slips
 through. I fancied that it worked some time ago. Not sure what happend.
Dealing with exceptions in the debugger is a bit tricky: - a 64-bit executable built with dmd only generates a "priveleged instruction exception" for unhandled exceptions as dmd generated code that does not use standard exception handling - a 32-bit executable built with dmd has regular exception handling code, but uses exception code 0xe0440001 for all exceptions - the standard VS debugger with or without the mago extension cannot filter on the actual exception - only the "mago debug engine" as selected in the "Debugging" project configuration can evaluate the "D Exceptions" settings, but it might have bitrotten... - when compiling with LDC, standard C++ exceptions are generated, and you can setup exception filters in the "C++ exceptions" group tl;dr: use LDC :-)
Jul 28 2021
parent frame <frame86 live.com> writes:
On Thursday, 29 July 2021 at 06:44:47 UTC, Rainer Schuetze wrote:

 - a 64-bit executable built with dmd only generates a 
 "priveleged instruction exception" for unhandled exceptions as 
 dmd generated code that does not use standard exception handling

 - a 32-bit executable built with dmd has regular exception 
 handling code, but uses exception code 0xe0440001 for all 
 exceptions
Well, I'm happy if it just breaks directly at the assert statement.
 - only the "mago debug engine" as selected in the "Debugging" 
 project configuration can evaluate the "D Exceptions" settings, 
 but it might have bitrotten...
True, it has issues with viewing some variables. Could you add a quick-debugger-switch button or something like that?
 - when compiling with LDC, standard C++ exceptions are 
 generated, and you can setup exception filters in the "C++ 
 exceptions" group

 tl;dr: use LDC :-)
Good to know, thanks.
Jul 29 2021