VisualD: Watch symbols are not found

Rainer Schuetze via Digitalmars-d-ide digitalmars-d-ide at puremagic.com
Tue Apr 18 23:36:52 PDT 2017



On 18.04.2017 22:56, Mike B Johnson wrote:
> When I input the name of local systems that show up in the locals window
> but then enter them or something related, they are not found and gives
> error D0013.
>
> These symbols show up in the locals window so I think that the watch
> code is not properly resolving them. I have tried to resolve them to no
> avail.

Can you provide an example?

Please also specify which debugger you are using (mago, plain VS or with 
VS with mago plugin, see 
http://rainers.github.io/visuald/visuald/Debugging.html).

>
> Some symbols do work, but some do not for some reason. It severely
> limits my ability to debug programs because I cannot see variables.
> Sometimes the locals window shows far to much stuff to quickly process
> what is going on.

Have you tried the Auto window?

> Usually it shows a lot of temp values mixed in with
> locals(globals are not shown ;/)

The temporaries are compiler generated variables. There is currently no 
way to hide them, but I also considered an option for mago.

Globals need to be specified with fully qualified name (pkg.mod.var), 
with '.' replaced by '@' when not using mago.

>
> It seems that the issue occurs much more often with things like loops:
>
> foreach(a; A)
> {
>
>    // cannot add a watch to a here, not found. Shows up in the locals as
> __r####.
>
> }
>

foreach is often compiled to a nested function without proper debug 
information about the context. You need to walk up the stack to see the 
variables there. Unfortunately, if the variables are captured in a 
closure, the debug information is still wrong.


More information about the Digitalmars-d-ide mailing list