Visual D debugging messed up

DigitalDesigns DigitalDesigns at gmail.com
Mon Jun 11 07:04:30 UTC 2018


On Sunday, 3 June 2018 at 07:03:08 UTC, Rainer Schuetze wrote:
>
>
> On 03/06/2018 03:14, DigitalDesigns wrote:
>> I'd like to make a similar request if you don't mind:
>> 
>> When using nested functions, only the types local to the 
>> function are shown in the locals. It would be nice if higher 
>> up variables would be shown. There is a this pointer but the 
>> value is invalid.
>> 
>> void foo(int x)
>> {
>>     int y;
>>     void bar(int z)
>>     {
>>       int c;
>>     }
>> }
>> 
>> When debugging bar all I see is c and z but not x and y. This 
>> would work for all nested functions which are functions that 
>> have a "this pointer". foo itself might be nested.
>> 
>
> Unfortunately, no debug information is emitted by dmd for the 
> function closure. LDC works better in that regard.

Could a stack trace not work? It might require some slueth work 
but if one can determine that the function was nested then one 
knows the the caller was the parent function... then backtrack 
and get the locals of that function. Would be tricky to be able 
to do it precisely.


More information about the Digitalmars-d-ide mailing list