Hacker News new | ask | show | jobs
by destructionator 3885 days ago
null deference in D doesn't throw exceptions by default on Unix so you won't see the backtrace there.

If you are working in a big codebase and have this come up, you can enable core dumps and run it in a debugger to get far more information than just a line number (and line numbers are there too at least if compiled in debug mode).

1 comments

does this mean there is not a way to get stack trace on OSX?
I have not tried it myself but there seem to be ways to get a stack trace on Linux.

http://vibed.org/docs#handling-segmentation-faults

I don't know about an automatic one, but running the debugger would still work there too. Or at least it should.
Try valgrind