Thread overview
Visual D does not show delegate variables or outside variables
Jul 06, 2016
Luke Picardo
Jul 06, 2016
Luke Picardo
Jul 06, 2016
Rainer Schuetze
Jul 06, 2016
Rainer Schuetze
July 06, 2016
When trying to debug a delegate, I get no ability to add a watch to any elements nor see any of the locals or outer scope. It makes it very difficult to debug them.

July 06, 2016
On Wednesday, 6 July 2016 at 01:36:52 UTC, Luke Picardo wrote:
> When trying to debug a delegate, I get no ability to add a watch to any elements nor see any of the locals or outer scope. It makes it very difficult to debug them.

Also BP's do not work well. I set it at a point in code and it moves it and stops several lines above, making it difficult to actually analyze the code. 3 lines above might not seem like much but they escape on a condition that I can't check because it is checked in real time.
July 07, 2016

On 06.07.2016 03:36, Luke Picardo wrote:
> When trying to debug a delegate, I get no ability to add a watch to any
> elements nor see any of the locals or outer scope. It makes it very
> difficult to debug them.
>

Unfortunately, dmd does not emit debug information for delegate closures, so the debugger cannot display them. If it is still available on the stack, you can switch to the appropriate stack frame to inspect it.
July 07, 2016

On 06.07.2016 04:06, Luke Picardo wrote:
> Also BP's do not work well. I set it at a point in code and it moves it
> and stops several lines above, making it difficult to actually analyze
> the code. 3 lines above might not seem like much but they escape on a
> condition that I can't check because it is checked in real time.

line number info emitted by dmd can sometimes be a bit wrong. If you have some repro-case, please report it to https://issues.dlang.org/

If you are using optimized builds, it can get really confusing (but that's also true for C++ builds).