Delphi 10 Seattle and 10.1 Berlin not able to debug COM DLL
Asked Answered
D

1

9

I have a COM DLL project, and I am able to debug it (stop at breakpoints) in Delphi 2007 and XE8.

However, it seems to not be possible for the IDE to stop at breakpoints in Delphi 10 Seattle or 10.1 Berlin.

My steps of debugging:

  1. Change to DEBUG (and check for those debug options ticked. e.g. Debug Information)

  2. regsvr32 the project DLL under output directory

  3. write a vbscript that simply creates the COM object and invoke its method

  4. in the debugger, set a Run command-line using c:\windows\syswow64\cscript.exe for 32-bit or c:\windows\system32\cscript.exe for 64-bit debugging

  5. set the command-line parameter to run the vbscript.

  6. set a breakpoint at the invoked method.

  7. Hit F9

Expected: to stop at the breakpoint

In Delphi 2007 and XE8, all is OK, but I was not able to do it in Delphi Seattle or Berlin.

What could possible go wrong here? Are there any settings that I need to enable/disable in order to debug the COM DLL under Delphi's latest IDE versions?

Danaedanaher answered 14/6, 2016 at 10:25 Comment(2)
Good question, but not so easy to answer. Could well be a bug.Rectilinear
File a report with Embarcadero at Quality Portal.Minacious
D
1

It looks like it is a issue of the IDE. I have raised the issue in JIRA: https://quality.embarcadero.com/browse/RSP-14964

I finally find a work-around in my case.

I have to press F8 instead of F9. In this case, the CPU window will popup with mixed Pascal and Assembly instructions, and if you press F9 it will be most likely to stop at break points (however sometimes random behavior do occur). I can reproduce this as many times as I want. Press F9 directly does not stop at breakpoints, but the cscript.exe window does popup during debugging.

My project is a 300K COM DLL.

Danaedanaher answered 17/6, 2016 at 17:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.