www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ide - VisualD: Watch symbols are not found

reply Mike B Johnson <Mikey Ikes.com> writes:
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.

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. Usually it shows a lot of temp 
values mixed in with locals(globals are not shown ;/)

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 


}


seems the debugger doesn't connect the basic symbol names 
together like it should(some cross referencing should be done?).

Thanks.
Apr 18 2017
next sibling parent reply Mike B Johnson <Mikey Ikes.com> writes:
I should also mention that it would be nice to be able to sort 
the names, values and types in the local and watch windows. 
Clicking on the column header does nothing.

I don't know if it is possible but it would also be cool to have 
different variables colored depending on where they come 
from(e.g., if they are global they are red, if from the current 
local scope they are green, etc).
Apr 18 2017
parent Rainer Schuetze <r.sagitario gmx.de> writes:
On 18.04.2017 22:58, Mike B Johnson wrote:
 I should also mention that it would be nice to be able to sort the
 names, values and types in the local and watch windows. Clicking on the
 column header does nothing.

 I don't know if it is possible but it would also be cool to have
 different variables colored depending on where they come from(e.g., if
 they are global they are red, if from the current local scope they are
 green, etc).
I don't think the debugger or Visual D have access to that functionality. Sorting locals could be implemented by a global option, though.
Apr 18 2017
prev sibling parent Rainer Schuetze <r.sagitario gmx.de> writes:
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


 }
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.
Apr 18 2017