急!在 RAD2010 中如何进行远程调试?

sczyq 2010-04-11 12:57:22
多台服务器上运行 DEBUG 版服务程序,由于其中某台不正常,所以需要进行远程调试。

但不知如何做,急需!

在 Run -> Attach to Process 中设置 Remote Machine 时,总是连接不上


问题:这个 Remote Machine 应该怎么设置,Remote Machine 上应运行什么?


明天将继续加分,第一个可解决的答案,重奖 200 分以上!
...全文
292 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
sczyq 2010-04-13
  • 打赏
  • 举报
回复
问题依然慧,但还是结了算了。
sczyq 2010-04-12
  • 打赏
  • 举报
回复
试试VC的?

罢了,谁叫我们是 BCB 粉丝呢,全盘重来 55555555555555.............. 人力资源有限!


还是一行一行的去分析CODE吧
sczyq 2010-04-12
  • 打赏
  • 举报
回复
不好意思,加分不了了,不是我的错,是CSDN不让加分,以前可以的,怎么现在9?????????????????
银点 2010-04-12
  • 打赏
  • 举报
回复
学习一下。
柯本 2010-04-12
  • 打赏
  • 举报
回复
服务程序,没试,可能有问题的.
其实BCB的remote debug不是很好用.我只是稍稍测试了一下.经常出错
试试VC的?




sczyq 2010-04-12
  • 打赏
  • 举报
回复
“Attach” 相应的进程 是 自编的服务程序,已经在运行,而不是 Application 程序。
YeBinYe 2010-04-11
  • 打赏
  • 举报
回复
呵呵,学习了!
柯本 2010-04-11
  • 打赏
  • 举报
回复
我的正常啊,你不会是去debug系统进程吧,或是已经在调试状态的进程,那样的确是不能用的
hemiya 2010-04-11
  • 打赏
  • 举报
回复
sczyq 2010-04-11
  • 打赏
  • 举报
回复
不错,我在远程机上安装了 RemoteDebugging , 在 Attach to Process 看到了进程,但一进行“Attach” 相应的进程时,就 “Unable to Craete process”, 就根本调不进来。
___NULL 2010-04-11
  • 打赏
  • 举报
回复
路过,来长知识
柯本 2010-04-11
  • 打赏
  • 举报
回复
测试一下,在虚拟机在测试成功
1.在虚拟机的D盘建一目录,并将本机BCB2010 bin目录以下文件拷入:
bccide.dll
bordbk140.dll
bordbk140N.dll
comp32x.dll
DCC140.dll
rmtdbg140.exe
2.在虚拟机下,进入命令行,并在上面目录下执行
regsvr32 bordbk140.dll
3.按上面的成功后,执行
rmtdbg140.exe -listen
这样,设置就完成了,只要在本机的Attach to Process 上输入虚拟机IP就OK了
柯本 2010-04-11
  • 打赏
  • 举报
回复
按说明上试一下:
一.在远程机上安装Debugger
Installing a Debugger on a Remote MachineFrom RAD Studio
Go Up to Debugging Applications Index

To debug a project on a machine that does not have RAD Studio installed, you must install the remote debugger executable files. You can install these files either directly from the installation disk or by copying them from a machine that has RAD Studio installed.

To install the remote debugger

Use the installation disk if it is available.
Use files from the machine that has the IDE installed if the installation disk is not available.
To install the remote debugger from the installation disk

Insert the installation disk into the remote machine.
Choose Install Remote Debugger.
Follow the instructions provided by the wizard.
The file name RemoteDebugger.exe on the product DVD is the Remote Debugger installer. You can copy this onto your developer workstation (your RAD Studio machine) to make deploying the remote Debugger to new target machines easier.
To install the remote debugger if the installation disk is not available

Create a directory on the remote machine for the installation files.
Locate the following files on the local machine (by default, the files are in C:\Program Files\Embarcadero\RAD Studio\<n.n>\Bin):
rmtdbg<nnn>.exe
bccide.dll
bordbk<nnn>.dll
bordbk<nnn>N.dll
comp32x.dll
DCC<nnn>.DLL
Note: The Version number shown above as <nnn> code varies from product version to product version, for RAD Studio 2010, the version number is 140, so the main remote debug client executable is called rmtdbg140.exe.
Copy the files from your local machine to the directory you created on the remote machine.
On the remote computer, register bordbk<nnn>.dll and bordbk<nnn>n.dllby running the regsvr32.exe registration utility. For example, on Windows XP, enter C:\Windows\System32\regsvr32.exe bordbk<nnn>.dll at the command prompt, then enter C:\Windows\System32\regsvr32.exe bordbk<nnn>n.dll.
如果你有安装盘,可直接从安装盘安装,否则按上面的
To install the remote debugger if the installation disk is not available
如果,远程机上直接装有2010,就直接可用了

二.远程调试You must establish a TCP/IP connection between the local and remote machines in preparation for remote debugging. This connection uses multiple ports that are chosen dynamically by Windows. The remote debug server listens on one port, and a separate port is opened for each application that is being debugged. A firewall that only allows connections to the listening port will prevent the remote debugger from working.

Note: If the remote machine uses the firewall included with Windows XP service pack 2, you will receive a message asking whether Embarcadero remote debugging service should be allowed. You must indicate that this is allowed.

Warning: The connection between RAD Studio and the remote debug server is a simple TCP/IP socket, with neither encryption nor authentication support. Therefore, the remote debug server should not be run on a computer that can be accessed over the network by untrusted clients.
To connect the local machine and the remote machine

Ensure that the remote debugger is installed on the remote machine.
Ensure that the executable files and symbol files (.tds. .rsm and .pdb) have been copied to the remote machine.
On the remote machine, start rmtdbg<nnn>.exe with the -listen argument.rmtdbg<nnn>.exe -listenThis starts the remote debugger's listener and directs it to wait for a connection from your host machine's IDE.
On the local machine, choose Run > Attach to Process .This displays the Attach to Process dialog.
Specify the host name or TCP/IP address for the remote machine, then click Refresh.A list of processes running on the remote machine is displayed. This verifies the connectivity between the local and remote machines.
On the local machine, choose Run > Load Process > Remote .This displays the Remote page of the Load Process dialog.
In the Remote path field, specify the full path for the directory on the remote machine into which you copied the executable files and symbol files. The name of the executable must be included.For example, if you are debugging a program1.exe, and you copy this to a directory named RemoteDebugFiles\Program1 on the remote machine, specifyC:\RemoteDebugFiles\Program1\program1.exe.
In the Remote host field, specify the host name or TCP/IP address for the remote machine.
Click the Load button.This connects the IDE on the local machine to the debugger on the remote machine.
Once this connection is established, you can use the IDE on the local machine to debug the application as it runs on the remote machine.

Note: You cannot see your remote application on the local machine, nor interact with it directly from the local machine, using only the Remote Debugger. For interactive debugging, you can establish a Remote Desktop Connection using any available remote-desktop software package, including those built into Windows (Remote Desktop) or other third-party remote-control software such as VNC or PC-Anywhere.
关键
1.要用tcp/ip协议
2.关闭防火墙
3.在远程机上运行rmtdbg<nnn>.exe -listen
我没有两台机测试,但我用
rmtdbg140.exe -listen
后,Attach to Process 输入IP是可以看到进程的

另外,你也可用run的load process来调入远程程序

1,317

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder 网络及通讯开发
社区管理员
  • 网络及通讯开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧