本文详细介绍Delphi5环境下如何调试动态库(包括进程内COM组件)。
name="google_ads_frame" marginwidth="0" marginheight="0" src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-3528650120430763&dt=1184237466281&lmt=1184237466&format=468x60_as&output=html&correlator=1184237466281&url=http%3A%2F%2Fgmai9999.googlepages.com%2Fhome&ad_type=text_image&ui=rc%3A0&cc=100&flash=9&u_h=768&u_w=1024&u_ah=708&u_aw=1024&u_cd=32&u_tz=480&u_java=true" frameborder="0" width="468" scrolling="no" height="60" allowtransparency="allowtransparency">
1. 在Run/Parameters设置宿主程序
2. 打开Modules对话框(View/Debug/Modules),右键选择“Add Module...”
3. 选择所需要调试的动态库
4. 将该动态库设为
5. 运行程序,程序会在加载该动态库时停下来
6. 再次打开Modules对话框,找到该动态库,右键选择“Reload Symbol Table...”
7. 在源代码中需要跟踪的地方设断点
8. 按F9继续运行程序,程序会在所设断点处停下来。
9. 再次调试时,重复5到8步即可。
注意:编绎后的DLL文件,必需和源代码放在同一个目录,对于一般动态库,宿主程序目录下也必需有一个相同拷贝,而COM组件必需进行注册。
name="google_ads_frame" marginwidth="0" marginheight="0" src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-3528650120430763&dt=1184237466281&lmt=1184237466&format=468x60_as&output=html&correlator=1184237466281&url=http%3A%2F%2Fgmai9999.googlepages.com%2Fhome&ad_type=text_image&ui=rc%3A0&cc=100&flash=9&u_h=768&u_w=1024&u_ah=708&u_aw=1024&u_cd=32&u_tz=480&u_java=true" frameborder="0" width="468" scrolling="no" height="60" allowtransparency="allowtransparency">
name="google_ads_frame" marginwidth="0" marginheight="0" src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-3528650120430763&dt=1184237466281&lmt=1184237466&format=468x60_as&output=html&correlator=1184237466281&url=http%3A%2F%2Fgmai9999.googlepages.com%2Fhome&ad_type=text_image&ui=rc%3A0&cc=100&flash=9&u_h=768&u_w=1024&u_ah=708&u_aw=1024&u_cd=32&u_tz=480&u_java=true" frameborder="0" width="468" scrolling="no" height="60" allowtransparency="allowtransparency">
1. 在Run/Parameters设置宿主程序
2. 打开Modules对话框(View/Debug/Modules),右键选择“Add Module...”
3. 选择所需要调试的动态库
4. 将该动态库设为
5. 运行程序,程序会在加载该动态库时停下来
6. 再次打开Modules对话框,找到该动态库,右键选择“Reload Symbol Table...”
7. 在源代码中需要跟踪的地方设断点
8. 按F9继续运行程序,程序会在所设断点处停下来。
9. 再次调试时,重复5到8步即可。
注意:编绎后的DLL文件,必需和源代码放在同一个目录,对于一般动态库,宿主程序目录下也必需有一个相同拷贝,而COM组件必需进行注册。
name="google_ads_frame" marginwidth="0" marginheight="0" src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-3528650120430763&dt=1184237466281&lmt=1184237466&format=468x60_as&output=html&correlator=1184237466281&url=http%3A%2F%2Fgmai9999.googlepages.com%2Fhome&ad_type=text_image&ui=rc%3A0&cc=100&flash=9&u_h=768&u_w=1024&u_ah=708&u_aw=1024&u_cd=32&u_tz=480&u_java=true" frameborder="0" width="468" scrolling="no" height="60" allowtransparency="allowtransparency">