1

Suppose I have a class TCar which supports interface ICar and is derived from TInterfacedObject.

program Project1;

{$APPTYPE CONSOLE}

{$R *.res}

uses
  System.SysUtils;

type
    ICar = interface
        ['{EF3294ED-7D3B-4B5D-8E10-FA9E406477D2}']
        procedure Start;

    end;

    TCar = class(TInterfacedObject, ICar)
    private
        procedure Start;
    end;

procedure TCar.Start;
begin
    WriteLn('Started!');
end;

var
    car: ICar;
begin
  try
    car := TCar.Create;

    car.Start;
    { TODO -oUser -cConsole Main : Insert code here }
  except
    on E: Exception do
      Writeln(E.ClassName, ': ', E.Message);
  end;
end.

When I debug the code above in 32 bit mode I am able to step in to method "Start" of the TCar class, moreover when I hover mouse over car variable I see that it is "TCar(address) as ICar" but when I try to debug this code in 64 bit mode I cannot step in to method "Start" (the debug execution just passes to the next line below the method call without stepping in) and I see "Pointer(address) as ICar" when I move mouse over car variable. What am I doing wrong? Being able to to step in to methods is very crucial in my project.

The Delphi XE8 has been installed recently on a clean machine and no antivirus has been installed.

Danilo Casa
  • 506
  • 1
  • 9
  • 18
Vasya Ar
  • 29
  • 4
  • I am guessing, but it might be related to the fact that the IDE is 32bit and has to use a form of remote debugging to debug a 64bit process, and maybe the remote debugger doesn't have enough functionality needed to fully evaluate an interface (the 64bit C++ debugger has a few restrictions, maybe the Delphi 64bit debugger does, too). – Remy Lebeau Feb 11 '16 at 05:02
  • @RemyLebeau Thank you, it is quite strange Embarcadero has not declared this fact – Vasya Ar Feb 12 '16 at 09:04
  • I did say I was *guessing*. – Remy Lebeau Feb 12 '16 at 18:33
  • I've created a Ticket at embarcadero. https://quality.embarcadero.com/browse/RSP-19344 This limitation is not documented and it is a real drawback when you have interfaces that are implemented by several classes. – santiagoIT Nov 10 '17 at 15:13

0 Answers0