digitalmars.D.debugger - VisualD/cv2pdb doesn't display AA's properly in the watch window.
- Lewis (38/38) Feb 17 2016 Test code (in a newly created project):
- Rainer Schuetze (7/43) Feb 18 2016 cv2pdb has not been updated to the new AA implementation in dmd 2.068
- Lewis (17/83) Feb 28 2016 Gotcha, thanks for the reply! Just tested with Mago, and it
- Rainer Schuetze (4/15) Mar 01 2016 I think this used to work, so I'd consider this a bug. As mago is very
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!
Feb 17 2016
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.
Feb 18 2016
On Thursday, 18 February 2016 at 23:01:24 UTC, Rainer Schuetze wrote:On 18.02.2016 01:36, Lewis wrote: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! LewisTest 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.
Feb 28 2016
On 28.02.2016 23:43, Lewis wrote: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?I think this used to work, so I'd consider this a bug. As mago is very much considered a part of Visual D, you might want to file a bug report here for component "visuald": https://issues.dlang.org/
Mar 01 2016