运行前一定要保证没有组件的线程在执行
How to debug a COM+ component in Delphi. - by Borland Developer Support Staff
Abstract: Debugging a COM+ component on Windows 2000.
Assuming you have already created a COM+ component in Delphi, these are steps for debugging:
1. In Delphi, go into the menu option Project | Options | Linker and setting the Include remote debug symbols option.
2. Go into the menu option Run | Parameters.
On the Local tab, under Host Application enter C:/WINNT/system32/dllhost.exe
Under Parameters enter /ProcessID:{GUID}
where GUID is the Application ID for your application.
This GUID can be obtained by going into Control Panel | Administrative Tools | Component Services
Locate the COM+ application under Component Services | Computer and open its properties.
On the first page below, the description box, is the Application ID.
After you have entered these parameters you can run the app (F9) to begin
debugging.