visual D BP's not being hit

Rainer Schuetze r.sagitario at gmx.de
Sun Jun 2 09:47:27 UTC 2019



On 02/06/2019 09:55, Amex wrote:
> It seems there is some issue with the source code mapping.
> 
> Even if I just do
> 
>         if (index < 0 || index >= S.length)
>             return;
> 
> and put a BP on the return then my code breaks at the line below it.
> 

That's a known issue with the dmd backend: it doesn't generate any code
that could be identified with the return statement, because the
respective jump instruction is already generated into the condition.

Walter thinks these kind of optimizations are necessary even in debug
builds, so that it still runs reasonably fast. I'm not so sure...

Workaround is adding some code to the return block statement that
isn't/cannot be removed.


More information about the Digitalmars-d-ide mailing list