Visual D Debugger "complaints" (Mago?)

Joerg Joergonson via Digitalmars-d-ide digitalmars-d-ide at puremagic.com
Sat Jun 18 08:57:10 PDT 2016


On Friday, 17 June 2016 at 08:18:59 UTC, Rainer Schuetze wrote:
>
>
> On 17.06.2016 04:05, Joerg Joergonson wrote:
>> I'm sure it would be quite easy to add code based debugging 
>> helpers(sort
>> of like visualizers) to do using D source. To prevent 
>> "security" issues
>> a warning system could be added easily:
>>
>> class XXX
>> {
>>    string Name;
>>    version(Debugger_Visualizer)
>>    {
>>        string toString() { return x.Name~" is trying to Hack 
>> you!?"; }
>>    }
>>
>> or one could include all that in a separate source like
>>
>> module Debugger_Visualizers
>>
>> string to!(XXX)(XXX x) { return x.Name~" Hacked?!!"; }
>> }
>>
>>
>> Then just keep track of all these cases and make the user sign 
>> off
>> on(hash the code and use an AA to see if the user has 
>> previously allowed
>> it).
>>
>> Other debuggers could eventually take advantage of it too and 
>> more
>> complex debugging visualizations could be implemented than just
>> toStrings (e.g., something similar to std.conv.to).
>>
>
> Visualizer code in the binary sounds like an interesting idea. 
> Given some convention on naming so that symbols are 
> discoverable and rather safe to call, that could be doable.
>
> Mago does not yet support calling code in the debugged process, 
> so that would be a first step to implement such kind of 
> visualizers.

It would be interesting, easy on the end user, and "portable" if 
it could be done.  Having it stored in modules could allow 
mago/VD to compile the code(since we know we have the compiler) 
outside the project. Generic debugging helpers could be written 
and shared. It just depends on the difficulty of implementing 
properly ;)


More information about the Digitalmars-d-ide mailing list