• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Delphi远程调试(转)

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

 

转自:

http://www.cnblogs.com/sandman/archive/2010/12/05/1897063.html

 

自己的开发机器称为主机,运行程序的机器称为目标机;
一、在主机编译执行程序
1、project->options->linker中的EXE and DLL options选项组中的include remote debug symbols打上勾

这样就可以生成rsm为扩展名的文件,该文件名称于你的项目同名。

2、project->options->Debugging中的勾可以全部选上,这是在你的程序支持debug(正式发布产品时要去掉这些选项,Delphi默认设置是选则大部分的)
3、Tools->Environment Options->Preferences的Compling and running选择组中选上Show compiler progress(可选项,在编译或者运行时显示编译过程,建议使用)
二、拷贝Project1.exe和Project1.rsm到目标机器的运行目录(该目录可以是你的安装目录,也可以任意)
注意:主机的代码不需和目标机的exe和rsm文件一致,就是说在进行第一步后不能改动你的代码
三、目标机安装borland的远程调试工具rdebug,delphi7光盘中就有,或者google一下。
四、启动目标机的rdebug,启动后目标机的托盘图标中会出现一个小“虫子”debug的图标
注意:远程调试工具不需正常运行才能进行远程调试
五、主机的Delphi的远程调试设置
1、Delphi中选择Run->load process->Remote
2、Remote Path中输入目标机器的运行目录
3、Remote Host中输入目标机IP

4、Working Directory 中输入目标机器的运行目录
5、选择LOAd

六、主机按F9调试即可

 

补充:

delphi 2010的远程调试,需要下面几个文件:
bccide.dll,bordbk140.dll,bordbk140N.dll,comp32x.dll,DCC140.dll,rmtdbg140.exe

文件都在2010的bin目录下。

 

另一个介绍: 

Sometimes is good to debug directly on the client computer, because the development computer does not have the problem. Of course, in such cases is not appropriate (and often not even possible) to install Delphi on the client computer and for this cases Delphi offer the possibility of remote debugging. How to do?

I show remote debugging on Delphi 2010 (service pack 4 and 5 required - fixed some problems), but remote debugging is supported on old Delphi too - only difference is filenames (see below).

In first step install debugger support on target computer. You can download remote debugging support from Embarcadero or from Delphi directory copy this files (for Delphi 2010 - Delphi version 14, so for another version please use proper files - maybe can be stability problem with Delphi 2005 or 2006).

bccide.dll bordbk140.dll bordbk140N.dll comp32x.dll DCC140.dll rmtdbg140.exe 

Now register files with:

regsvr32 bordbk140.dll regsvr32 bordbk140n.dll 

Ok, so necessary tasks are done (this can be necessary only for first time) and start debugging.

On target computer start remote debugger (rmtdbg140.exe) - when started small icon is showed in tray (green bug).

Now on project enable Remote debug symbols and Debug information. With first option compiler will create RSM files during compilation.

Compiled binary file with rsm files copy on client computer. In menu Run select Load Process

… and in Remote tab fill fields (see screenshot - directories are from target computer).

Now only click on Load and if everything is good, program will stop on first line of program (probably on first line in dpr file) and you can set breakpoints or everything like during normal debugging. And this is all.

When problems with communication try for example ping (and check firewall or stupid anti viruses and so on).

Update: simple demo - download

Update: maybe for some windows configuration remote debugging working only when everything is in same directory 

 

转自:

http://www.cnblogs.com/sandman/archive/2010/12/05/1897063.html

 

自己的开发机器称为主机,运行程序的机器称为目标机;
一、在主机编译执行程序
1、project->options->linker中的EXE and DLL options选项组中的include remote debug symbols打上勾

这样就可以生成rsm为扩展名的文件,该文件名称于你的项目同名。

2、project->options->Debugging中的勾可以全部选上,这是在你的程序支持debug(正式发布产品时要去掉这些选项,Delphi默认设置是选则大部分的)
3、Tools->Environment Options->Preferences的Compling and running选择组中选上Show compiler progress(可选项,在编译或者运行时显示编译过程,建议使用)
二、拷贝Project1.exe和Project1.rsm到目标机器的运行目录(该目录可以是你的安装目录,也可以任意)
注意:主机的代码不需和目标机的exe和rsm文件一致,就是说在进行第一步后不能改动你的代码
三、目标机安装borland的远程调试工具rdebug,delphi7光盘中就有,或者google一下。
四、启动目标机的rdebug,启动后目标机的托盘图标中会出现一个小“虫子”debug的图标
注意:远程调试工具不需正常运行才能进行远程调试
五、主机的Delphi的远程调试设置
1、Delphi中选择Run->load process->Remote
2、Remote Path中输入目标机器的运行目录
3、Remote Host中输入目标机IP

4、Working Directory 中输入目标机器的运行目录
5、选择LOAd

六、主机按F9调试即可

 

补充:

delphi 2010的远程调试,需要下面几个文件:
bccide.dll,bordbk140.dll,bordbk140N.dll,comp32x.dll,DCC140.dll,rmtdbg140.exe

文件都在2010的bin目录下。

 

另一个介绍: 

Sometimes is good to debug directly on the client computer, because the development computer does not have the problem. Of course, in such cases is not appropriate (and often not even possible) to install Delphi on the client computer and for this cases Delphi offer the possibility of remote debugging. How to do?

I show remote debugging on Delphi 2010 (service pack 4 and 5 required - fixed some problems), but remote debugging is supported on old Delphi too - only difference is filenames (see below).

In first step install debugger support on target computer. You can download remote debugging support from Embarcadero or from Delphi directory copy this files (for Delphi 2010 - Delphi version 14, so for another version please use proper files - maybe can be stability problem with Delphi 2005 or 2006).

bccide.dll bordbk140.dll bordbk140N.dll comp32x.dll DCC140.dll rmtdbg140.exe 

Now register files with:

regsvr32 bordbk140.dll regsvr32 bordbk140n.dll 

Ok, so necessary tasks are done (this can be necessary only for first time) and start debugging.

On target computer start remote debugger (rmtdbg140.exe) - when started small icon is showed in tray (green bug).

Now on project enable Remote debug symbols and Debug information. With first option compiler will create RSM files during compilation.

Compiled binary file with rsm files copy on client computer. In menu Run select Load Process

… and in Remote tab fill fields (see screenshot - directories are from target computer).

Now only click on Load and if everything is good, program will stop on first line of program (probably on first line in dpr file) and you can set breakpoints or everything like during normal debugging. And this is all.

When problems with communication try for example ping (and check firewall or stupid anti viruses and so on).

Update: simple demo - download

Update: maybe for some windows configuration remote debugging working only when everything is in same directory 


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
matlab快速入门(27):数据导出发布时间:2022-07-18
下一篇:
MATLAB基础知识——1.2MATLAB数值数据 - Tea&Honey发布时间:2022-07-18
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap