www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19985] New: No debug line info for simple code blocks

https://issues.dlang.org/show_bug.cgi?id=19985

          Issue ID: 19985
           Summary: No debug line info for simple code blocks
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: symdeb
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: r.sagitario gmx.de

build with -g:

void foo()
{
}

void fun(bool b)
{
    if (b)         // when stepping here, debugger jumps to end of function
        return;    // cannot set breakpoint here
    foo();
}

void main()
{
        fun(true);
}

tested on Windows only, but unlikely to be platform specific.

--
Jun 18 2019