Mago with VisualD can't show top-level variables in the watch window

Rainer Schuetze via Digitalmars-d-ide digitalmars-d-ide at puremagic.com
Mon Jul 27 00:05:50 PDT 2015



On 27.07.2015 03:21, Lewis wrote:
> I have the following minimal test code:
>
> import std.stdio;
> int TEST_CONSTANT = 999;
> int main(string[] argv)
> {
>      writeln(TEST_CONSTANT);
>      readln();
>      return 0;
> }
>
> I'm running this in VS2013 with VisualD 0.3.41 and setting a breakpoint
> on the readln() line. In the watch window, I get "D0013: Error: Symbol
> not found" when trying to inspect TEST_CONSTANT. In contrast, if I
> create a local variable inside of main, I can view that just fine.
>
> I have native edit and continue enabled, and Mago is set as the debugger
> in both the project debug settings and the global VisualD settings. I
> have Debug Info set to "Symbolic (suitable for Mago)", and cv2pdb turned
> off.
>
> For reference, I get exactly the same behaviour when using the VS
> debugger and cv2pdb enabled.
>
> Is this unsupported in Mago, or am I missing something?
>
> Thanks in advance!

Unfortunately there is not enough debug information to figure out the 
mangling of TEST_CONSTANT, because it is decorated with the module name. 
So you have to specify its fully qualified name in watch window, e.g. 
"test.TEST_CONSTANT" if your module is named "test".

[This works with mago, but the Visual Studio debugger engine is confused 
by '.' inside names. cv2pdb translates them to '@', so you have to use 
"test at TEST_CONSTANT" with the translated debug information.]


More information about the Digitalmars-d-ide mailing list