www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.debugger - any chance of showing array contents & classes with debugOutput() func to show their contents?

reply bc <mi_emayl_adrez hotmail.com> writes:
any chance of showing array contents & classes with debugOutput() or  
toString() func to show their contents in ddbg?

that would be really cool
Apr 19 2007
parent reply Jascha Wetzel <"[firstname]" mainia.de> writes:
what exactly do you mean?
ddbg should output the result of a toString method of a class if it has one?
array contents and classes can already be shown component-wise.

bc wrote:
 
 any chance of showing array contents & classes with debugOutput() or
 toString() func to show their contents in ddbg?
 
 that would be really cool
Apr 19 2007
parent reply bc <mi_emayl_adrez hotmail.com> writes:
On Thu, 19 Apr 2007 17:43:43 +0100, Jascha Wetzel  =

<"[firstname]" mainia.de> wrote:

 what exactly do you mean?
 ddbg should output the result of a toString method of a class if it ha=
s =
 one?
yes. although i realise that could have side-effects or cause errors so maybe make it configurable or make it work on a specially named method
 array contents and classes can already be shown component-wise.
i mean for arrays of ints or strings or classes with a debugOutput(), to= output the first 10 or so elements along with the number of elements, automatically. visual studio does this on vector<int>s at least and it = makes a great difference. e.g. TestVector =3D [5](10,20,30,40,50) pretty please?
 bc wrote:
 any chance of showing array contents & classes with debugOutput() or
 toString() func to show their contents in ddbg?

 that would be really cool
Apr 19 2007
parent reply Jascha Wetzel <"[firstname]" mainia.de> writes:
i see what you mean for classes, but arrays of ints? they are output in
the only way i can imagine (make sure you use dmd 1.011 or later and
ddbg 0.1 or later to not have to use type casts on arrays)

bc wrote:
 On Thu, 19 Apr 2007 17:43:43 +0100, Jascha Wetzel
 <"[firstname]" mainia.de> wrote:
 
 what exactly do you mean?
 ddbg should output the result of a toString method of a class if it
 has one?
yes. although i realise that could have side-effects or cause errors so maybe make it configurable or make it work on a specially named method
 array contents and classes can already be shown component-wise.
i mean for arrays of ints or strings or classes with a debugOutput(), to output the first 10 or so elements along with the number of elements, automatically. visual studio does this on vector<int>s at least and it makes a great difference. e.g. TestVector = [5](10,20,30,40,50) pretty please?
 bc wrote:
 any chance of showing array contents & classes with debugOutput() or
 toString() func to show their contents in ddbg?

 that would be really cool
Apr 19 2007
parent bc <mi_emayl_adrez hotmail.com> writes:
On Thu, 19 Apr 2007 20:00:52 +0100, Jascha Wetzel  =

<"[firstname]" mainia.de> wrote:

ah, it already does what i was talking about for arrays on those version=
s,
sorry.

 i see what you mean for classes, but arrays of ints? they are output i=
n
 the only way i can imagine (make sure you use dmd 1.011 or later and
 ddbg 0.1 or later to not have to use type casts on arrays)

 bc wrote:
 On Thu, 19 Apr 2007 17:43:43 +0100, Jascha Wetzel
 <"[firstname]" mainia.de> wrote:

 what exactly do you mean?
 ddbg should output the result of a toString method of a class if it
 has one?
yes. although i realise that could have side-effects or cause errors =
so
 maybe make it configurable or make it work on a specially named metho=
d
 array contents and classes can already be shown component-wise.
i mean for arrays of ints or strings or classes with a debugOutput(),=
to
 output the first 10 or so elements along with the number of elements,=
 automatically. visual studio does this on vector<int>s at least and i=
t
 makes a
 great difference.

 e.g.
 TestVector =3D [5](10,20,30,40,50)

 pretty please?

 bc wrote:
 any chance of showing array contents & classes with debugOutput() o=
r
 toString() func to show their contents in ddbg?

 that would be really cool
Apr 20 2007