How to debug and watch globals in windows debugger?

ryuukk_ ryuukk.dev at gmail.com
Tue Mar 28 11:07:02 UTC 2023


On Tuesday, 28 March 2023 at 04:22:24 UTC, Richard (Rikki) Andrew 
Cattermole wrote:
> On 28/03/2023 2:25 PM, ryuukk_ wrote:
>> On Tuesday, 28 March 2023 at 01:06:50 UTC, Richard (Rikki) 
>> Andrew Cattermole wrote:
>>> Have you tried installing mago?
>>>
>>> https://github.com/rainers/mago
>>>
>>> There are instructions for vs-code in README.
>> 
>> I did not try mago, but it shouldn't be needed as pdb is 
>> universally understood by tools
>
> Agreed, I would expect globals (including TLS) to work without 
> a debugger extension.
>
>> While i will try with mago, it shouldn't satisfy us, 
>> workarounds are temporary solutions
>
> Its not a workaround, mago (in this case) is an extension to 
> MS's debugger framework which provides D specific features, 
> you'd want it regardless if you work with the debugger with D a 
> lot. Debuggers typically have language specific features to 
> make them easier to work with.
>
> Jan should be shipping this I think.

It is a workaround, it should work already out of the box with 
existing tools

It works for other languages, why not for D? problem

Check here:

https://godbolt.org/z/nYGfMTqYY


int global; on C++ has !dbg

int global; on D doesn't have !dbg

This is a bug in D, therefore it should be fixed


More information about the Digitalmars-d-learn mailing list