automatic debugging / disabling D's built-in exeption handler
Sean Kelly
sean at f4.ca
Sun Nov 5 13:07:51 PST 2006
Bill Baxter wrote:
> By following the instructions given, eg, here:
> http://www.codeproject.com/debug/windbg_part1.asp#_Toc64133667
>
> it should be possible to make the debugger pop up automatically for
> programs that have exceptions.
>
> According to the article above:
> "WinDbg will be launched if an application throws an exception while not
> being debugged and does not handle the exception itself"
>
> Apparently D does some sort of top-level catch of such exceptions right
> now, because sticking an "asm { int 3; }" in the code just prints the
> message "Error: Win32 Exception" instead of launching the debugger. Is
> there some way to disable that?
>
> --
> Really what I was trying to do was see if I could get Visual Studio to
> debug D code. Actually it sort of works. If you have a program with a
> main loop, you can use visual studio's Tools->Debug Processes... to
> attach to the running process. If you've built your program with -g,
> you can see the stack trace and step through the program normally, and
> even set breakpoints.
>
> But you can't examine variables. VisualStudio could tell that there was
> a "this" pointer, and knew it was of type MyClass, but it couldn't tell
> what was inside of 'this'. I wonder if there's a way to make a Visual
> Studio plugin that would give you this ability?
>
> --bb
Try:
extern (C) bool no_catch_exceptions;
no_catch_exceptions = true;
More information about the Digitalmars-d
mailing list