VisualD/cv2pdb doesn't display AA's properly in the watch window.
Lewis via Digitalmars-d-debugger
digitalmars-d-debugger at puremagic.com
Sun Feb 28 14:43:45 PST 2016
On Thursday, 18 February 2016 at 23:01:24 UTC, Rainer Schuetze
wrote:
>
>
> On 18.02.2016 01:36, Lewis wrote:
>> Test code (in a newly created project):
>>
>>
>> import std.stdio;
>>
>> int main(string[] argv)
>> {
>> writeln("Hello Blah!");
>>
>> string[string] testAA = null;
>> testAA["test1"] = "Hello";
>> testAA["test2"] = "Goodbye";
>> testAA["blah"] = "string";
>> testAA["bloop"] = "another string";
>> testAA["words"] = "test string";
>>
>> int[] testArray = null;
>> testArray ~= 3;
>> testArray ~= 10;
>> testArray ~= 11;
>> testArray ~= -2;
>> testArray ~= 14;
>>
>> readln(); // Breakpoint on this line
>> return 0;
>> }
>>
>>
>> When I check the watch window, I see the following:
>> http://imgur.com/mxOxitP
>>
>> I'm using DMD 2.069.0. The project is set to use the VS
>> debugger and
>> cv2pdb. I'm using VS2015, with native compatibility and edit
>> and
>> continue enabled: http://imgur.com/6mBDtN4
>>
>> The debugger displays the dynamic array just fine. It correctly
>> identifies the AA as an aa2, complete with types, and knows
>> its size. It
>> just doesn't display its contents correctly. I've tried
>> reinstalling
>> VisualD with no luck. I've checked the autoexp.dat and the
>> VisualD
>> entries are there as expected. I tried mucking with
>> autoexp.dat a bit to
>> see if I could make it work myself, but to no avail, although
>> that tells
>> me VS is indeed using autoexp.dat as I'd expect.
>>
>> Any ideas what's going on? My suspicion is that something in
>> D's
>> representation of AAs changes slightly, and now the
>> autoexp.dat just
>> needs a tweak, but I don't know nearly enough to know what to
>> fix myself.
>>
>> Thanks in advance!
>
> cv2pdb has not been updated to the new AA implementation in dmd
> 2.068
> (http://dlang.org/changelog/2.068.0.html#aa-open-addressing)
> yet. That's why the type information generated by cv2pdb does
> not fit and autoexp.dat cannot extract the info.
>
> IIRC mago has been updated, so you might want to use this
> debugger engine instead.
Gotcha, thanks for the reply! Just tested with Mago, and it
indeed shows AAs as expected.
As an aside, I noticed a quirk when viewing AAs with Mago in VS.
If I have an AA of strings to structs, I can see all the keys and
struct addresses no problem. However, I can't drill down further
and inspect the contents of an individual struct. That being
said, I can create a second watch of the form 'testAA["key"]',
and now I can see the contents of that struct.
Just curious if there is a technical or design limitation
preventing this, or if it just never got implemented. If it's the
latter, may I humbly add this as a feature request for whenever
yourself or another developer who knows Mago has time? I'm
guessing I'd just add an issue on the github page?
Thanks!
Lewis
More information about the Digitalmars-d-debugger
mailing list