Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/Debugger    [ Add a report in this area ]  
Report #:  130567   Status: Open
Under x64 Debug configuration the debugger works only to line "FreeLibrary(h);".
Project:  Delphi Build #:   21.0.17707.502
Version:    21.0 Submitted By:   Alexey Ponomarev
Report Type:  Basic functionality failure Date Reported:  3/20/2015 1:17:14 AM
Severity:    Serious / Highly visible problem Last Updated: 7/13/2015 4:09:08 AM
Platform:    64 Bit Internal Tracking #:   65070
Resolution: None (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: (1 Total Rating)
5.00 out of 5
Total Votes: 16
Description
Under x64 Debug configuration the debugger works only to line "FreeLibrary(h);".
After this line CPU windows appears and debugging works only through it. Any source code tracing is lost.

procedure TForm1.Button1Click(Sender: TObject);
var
  FileName: string;
  h: HModule;
begin
  FileName := ExtractFilePath(GetModuleName(HInstance)) + 'Project2.dll';
  if FileExists(FileName) then begin
    h := LoadLibrary(PChar(FileName));
    if h<>0 then begin
      FreeLibrary(h);
    end;
    self.Caption := self.Caption + '2';
  end;
end;

Screencast: http://www.screencast.com/t/01gWEHZQIv
Steps to Reproduce:
1. Open group project ProjectGroup1.groupproj
2. build all
3. Add brekpoint in Unit1.pas on line 33
4. Add brekpoint in Project2.dpr on line 24
5. F9
6. Push Buttun1
7. F9
8. F9
10. Push Buttun1
Workarounds
If you turn off all debugging options of DLL project (Project2.dpr) it works fine.
Under x32 it also works.
But it isn't workaround  - How debug?
Attachment
130567.zip
Comments

None

Server Response from: ETNACODE01