digitalmars.D.ide - properties in debug watches in visual D?
- Amex (15/15) Jun 02 2019 Would it be possible to get properties to show up in the debug
- Rainer Schuetze (3/21) Jun 03 2019 Some of the machinery works, but executing code in the debuggee can be
Would it be possible to get properties to show up in the debug watch/local/auto's? These are used quite often when programming to interfaces because fields are not allowed. 1. Either use properties or possibly have a special attribute that could mark functions that are to be displayed as variables(getters = no non-default parameters and a non-void return type). 2. Simply try to display all getters. This might duplicate a bunch of the fields though. Could have a special entry that one could expand and it would then list all the getter values(so only evaluates these when expanded). 3. I tend to use the same name for the field as the property so if there is a basic match(differ only by case or underscore) then only display one(so fields and functions are not both shown)... but obviously this might differ in many apps so is not robust.
Jun 02 2019
On 02/06/2019 17:49, Amex wrote:Would it be possible to get properties to show up in the debug watch/local/auto's? These are used quite often when programming to interfaces because fields are not allowed. 1. Either use properties or possibly have a special attribute that could mark functions that are to be displayed as variables(getters = no non-default parameters and a non-void return type). 2. Simply try to display all getters. This might duplicate a bunch of the fields though. Could have a special entry that one could expand and it would then list all the getter values(so only evaluates these when expanded). 3. I tend to use the same name for the field as the property so if there is a basic match(differ only by case or underscore) then only display one(so fields and functions are not both shown)... but obviously this might differ in many apps so is not robust.Some of the machinery works, but executing code in the debuggee can be pretty hrmful. See also https://issues.dlang.org/show_bug.cgi?id=16692
Jun 03 2019