Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I break on exception using ddbg

Tags:

d

I'm using the d programing language to write a program, and I'm trying to use ddbg to debug it. When there is an exception, I want to have the program break whenever there is an exception thrown so that I can inspect the stack.

Alternatively, is there another debugger that works with d? Is there another way to get a stack trace when there is an exception?

like image 798
user4891 Avatar asked Dec 29 '25 05:12

user4891


1 Answers

You want to break when there's any exception thrown or just uncaught exceptions? Because I think the latter is already the default behavior.

You probably know this, but you get the stack trace by typing 'us' (unwind stack) at the prompt. Just trying to eliminate the obvious.

Anyway, I've never had to use onex. Never even heard of it. Another thing you could try is forcing execution to stop by putting in asserts.

like image 113
Baxissimo Avatar answered Dec 31 '25 00:12

Baxissimo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!