www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ide - VD Debugging static variables and such symbols missing

reply Prudence <Pursuit Happyness.All> writes:
Can't add watches to basic stuff. VS shows them missing:

public class X
{
	public static int[] Y;
}

Can't add a watch to X or Y even though, at the very least, 
should should be able to get Y.

I should expect a watch on a class to show it's static members.

My guess is that this is just oversight. It makes it very 
difficult to debug in some cases.
Sep 15 2015
next sibling parent reply Prudence <Pursuit Happyness.All> writes:
On Wednesday, 16 September 2015 at 01:18:34 UTC, Prudence wrote:
 Can't add watches to basic stuff. VS shows them missing:

 public class X
 {
 	public static int[] Y;
 }

 Can't add a watch to X or Y even though, at the very least, 
 should should be able to get Y.

 I should expect a watch on a class to show it's static members.

 My guess is that this is just oversight. It makes it very 
 difficult to debug in some cases.
Also, it would be nice if we can expand nested arrays. Currently the watch of an array/aa will just expand a generic string [length, ptr] but can't be expanded any further. This requires us to have to add another watch that lets us go further down the tree. We should be able to simply expand any depth of a multi nested array as we want(until we run out of arrays).
Sep 15 2015
parent Rainer Schuetze <r.sagitario gmx.de> writes:
On 16.09.2015 03:22, Prudence wrote:
 Also, it would be nice if we can expand nested arrays. Currently the
 watch of an array/aa will just expand a generic string [length, ptr] but
 can't be expanded any further. This requires us to have to add another
 watch that lets us go further down the tree.

 We should be able to simply expand any depth of a multi nested array as
 we want(until we run out of arrays).
Inspecting arrays works with the mago debug engine. The default VS debug engine uses a visualization description language that just doesn't work with D type syntax. You can switch the VS debug engine back to an older version by enabling "native edit and continue" in the global debugging options. This debug engine supports visualization macros in autoexp.dat. Visual D adds display macros for strings and arrays into this file.
Sep 16 2015
prev sibling parent reply Rainer Schuetze <r.sagitario gmx.de> writes:
On 16.09.2015 03:18, Prudence wrote:
 Can't add watches to basic stuff. VS shows them missing:

 public class X
 {
      public static int[] Y;
 }

 Can't add a watch to X or Y even though, at the very least, should
 should be able to get Y.

 I should expect a watch on a class to show it's static members.

 My guess is that this is just oversight. It makes it very difficult to
 debug in some cases.
When using the native VS debugger, we are bound to what is possible by simulating C/C++. The mangling is so different that the VS debugger cannot find the respective symbols. When speaking of mago, the static members are listed as members of an instance, but cannot be watched in an expression as X.Y (I guess that's an oversight). I've never seen watching the static members of a class by just entering
Sep 16 2015
parent Rainer Schuetze <r.sagitario gmx.de> writes:
On 16.09.2015 23:26, Rainer Schuetze wrote:
 When speaking of mago, the static members are listed as members of an
 instance, but cannot be watched in an expression as X.Y (I guess that's
 an oversight).
On second thought, wathing static members does work, but you have to specify the fully qualified name including the modulename. With the VS debug engine using the conversion tool cv2pdb, replace '.' with ' '.
Sep 16 2015