int fun() @nogc { int x; auto foo() scope { int nested() { return x; } return nested(); } return foo(); } Variable 'x' is not visible in the debugger when stepping through 'foo' or 'nested'. Instead, only an opaque 'void* this' is shown.
https://github.com/dlang/dmd/pull/8906
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/e922ee78128b87e4fad757c51d58ec3e78d3f9c7 fix Issue 19318 - Variables captured from outer functions not visible in debugger create struct type corresponding to the stack variables that are captured by nested functions and assign it to the context pointer in the nested function https://github.com/dlang/dmd/commit/dfc29bcd488a2de335301728fe2185b60c05a391 Merge pull request #8906 from rainers/issue19318 fix Issue 19318 - Variables captured from outer functions not visible in debugger