What is D's "__debugbreak()" equivalent?

H. S. Teoh hsteoh at quickfur.ath.cx
Wed Oct 27 17:07:31 UTC 2021

On Wed, Oct 27, 2021 at 04:54:49PM +0000, Simon via Digitalmars-d-learn wrote:
> Microsofts C++ compiler provides the __debugbreak function, which on
> x86 emits interrupt 3, which will cause the debugger to halt. What is
> the equivalent in D? I tried using raise(SIGINT) from
> core.stdc.signal, but that just closes the debugger (I thought that
> was the same, seems like I was wrong).

Why not just:

	asm { int 3; }


Just tested in gdb, it worked.


MASM = Mana Ada Sistem, Man!

More information about the Digitalmars-d-learn mailing list