Has anyone been able to debug with VS2005?
Bradley Smith
digitalmars-com at baysmith.com
Tue Nov 14 23:46:07 PST 2006
Arrays can be evaluated using watch expressions. For example,
char[] a = "abc";
a.length is the watch expression (int)a
a.ptr is the watch expression (char*)*((int*)(&a)+1)
You can use the format suffix on the watch expression to display the
whole string. For example "abc" is displayed with (char*)*((int*)(&a)+1),3
Lionello Lunesu wrote:
> Actually, I only program D from within VS2005!
>
> I use the vsplugind found on dsource, but that's only needed for building
> right from VS. Just for debugging, you don't need anything. Compiling your
> program using dmd -g will add the needed symbols to the obj/exe and VS will
> understand them! Arrays are shown as 64-bit integers, but when seen in hex,
> it's obvious what part is the count and what the pointer. Alternatively, you
> can take the array's address and cast it to a int*.
>
> For syntax highlighting you should add .d to the extensions list in the
> options dialog, and let VS treat it as C++ or C#. Missing keywords can be
> added using a text-file called usertype.dat with a keyword on each line. It
> goes in the VS "IDE" folder, if I'm not mistaken, but better google to
> duoble check that (no VS2005 here at home).
>
> L.
>
>
More information about the Digitalmars-d-learn
mailing list