Jump to content

Tostis

Members
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

0 Neutral
  1. Tostis

    Inspect variables during debug

    I'll evaluate how does it take before starting to develop my own debugger.
  2. Tostis

    Inspect variables during debug

    I'm using interfaces because I have various implementations of the same class, too.
  3. Tostis

    Inspect variables during debug

    Evaluating expression into watch list is not so useful. It isn't feasible to watch collections of intefaces containing interfaces ecc... Can you give some best pratices for debugging code? Should I avoid interfaces? Are there plugin for RAD that can help me?
  4. Tostis

    Inspect variables during debug

    So if I want to debug propertly I should give up on using interface reference counting and destroy all objects by myself?
  5. I can't understand how I can inspect variable content when debugger is stopped due to breakpoint. Local variable window shows testvar but I cannot see the content of FSampleField and FInnerField.FOtherField. Am I doing something wrong? unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls; type TForm1 = class(TForm) Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; type IInner = interface procedure setOtherField(b: integer); end; type TInner = class(TInterfacedObject, IInner) private var FOtherField: integer; procedure setOtherField(b: integer); end; type ITest = interface procedure setSampleField(a: string); procedure setInnerField(b: IInner); end; type TTest = class(TInterfacedObject, ITest) private var FSampleField: string; private var FInnerField: IInner; procedure setSampleField(a: string); procedure setInnerField(b: IInner); end; implementation {$R *.dfm} procedure TTest.setSampleField(a: string); begin FSampleField:= a; end; procedure TTest.setInnerField(b: IInner); begin FInnerField:= b; end; procedure TInner.setOtherField(b: Integer); begin FOtherField:= b; end; procedure TForm1.Button1Click(Sender: TObject); begin var testInnerVar: IInner:= TInner.Create(); testInnerVar.setOtherField(55); var testvar: ITest:= TTest.Create(); testvar.setSampleField('avalue'); testvar.setInnerField(testInnerVar); end; end.
×