早就发现安装CB时有个Remote Debug的东西,一直没用过,哪位高手给我扫盲.谢谢.

BeRoy 2007-12-24 02:41:13
顺便散点小分了.
...全文
348 14 打赏 收藏 转发到动态 举报
写回复
用AI写文章
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
laowang2 2007-12-27
  • 打赏
  • 举报
回复
关注。
constantine 2007-12-27
  • 打赏
  • 举报
回复
没用过。不少工具都带有这个功能的
编译失败 2007-12-27
  • 打赏
  • 举报
回复
就是远程调试嘛
cczlp 2007-12-26
  • 打赏
  • 举报
回复
传说中的双机调试?
ydlchina 2007-12-26
  • 打赏
  • 举报
回复
好不容易碰到这么个高档帖,怎么没人响应啊,看来BCB人气真的不旺,就没人用过这个鸟。
xuhuiqinfeng 2007-12-26
  • 打赏
  • 举报
回复
不是特别复杂。大体给你讲一下,主要有几点要注意的。
1、安装远程调试器请见下列文档,并将调试器运行起来,他会侦听相应的端口
===================================================================
The debugger supports remote debugging of executable files, library files, and packages that are built with debug symbols. The remote debug server is not supported on Windows 95 or Windows 98 as a service. The main components of remote debugging are:

The "client" IDE, which provides the UI for the debugging session (BCB.exe).
The "debug server" on the remote machine (bordbg61.exe). The server's function is to control the debugger and interact, via a network connection, with the IDE. The debug server must have access to the debug kernel dll (bordbk61.dll) and an evaluator dll (comp32p.dll or dcc60.dll for debugging Pascal; see Multiple evaluators). To install, you need to run setup.exe located in the RDEBUG directory.

Starting the debug server

To start the server, you need either administration rights or debugging rights on the remote machine. The client IDE will not be able to connect to the remote debug server unless the latter is running.

There are two ways to start the debug server: Manually, using the bordbg61.exe or as a Windows NT or 2000 service: On Windows 95 or 98, NT services are not available and the debug server must be started manually.

To start the server manually, run bordbg61.exe -listen from the command line (the only option for Windows95/98).
Installing the debug server as a Windows NT or 2000 service should be done through the remote debug setup program. You can use the Services applet from the Control Panel to check whether the "Borland Remote Debugging Service" is installed and running. (Windows NT or 2000 only).

Setting the client IDE

1. Under the Remote tab of the Run|Parameters menu, set the Remote path to directory and EXE name as the server will see it.
2. Set the remote host to the server machine name or IP address.
3. Click Debug project in the IDE.

Note: The server needs to be able to see the EXE and the symbols. If you run the server as a service, the server will not have access to network shared drives. In this case, you have to either copy the symbols and EXE to the server machine, or set the output directory to be on the server. IDE needs to find the source. For example:

Set the Remote Path on the Remote tab of the Run|Parameters menu relative to the remote system, that is, as the remote system sees it.
Set the Final output (on the Directories/Conditionals page of the Project Options dialog) relative to the local machine (IDE). Use the shared drive+path to identify this output directory.

Connecting to the remote machine

Before starting remote debugging the IDE needs to connect to the remote machine. To do this, it needs to specify a machine name and, optionally, a port number and password.

The local and remote machines must be linked by TCP/IP. Communication for remote debugging uses a TCP socket and relies on standard Internet name resolution to establish this connection (DNS). This means the local machine must be able to obtain an IP address for the remote machine. The command "nslookup name" utility can be used to confirm the IP address bound to a particular name. Note that the DNS and Microsoft networking names for a machine can be different. Both names can be obtained from the networking applet in the control panel.

The client IDE and debug server currently use port 8000 as a connection point.

Bordbg61.exe has three command-line options:

Listen causes the server to wait for a connection; non-service mode.
Install installs the service (as a Windows NT or 2000 service only) and does not start the service.
Remove removes the service, stopping it if necessary.

Using the server under Windows 95 or Windows 98

On Windows 95 or Windows 98, the Remote Debugging service can only be run as a program. To run as a program, run bordbg61.exe -listen from the command line or a shortcut.
===================================================================

2、以远程主机为192.168.0.12为例,将要调试的程序所在的目录共享出来,保证可以通过网上邻居访问。(这样就成功一半了)
3、bcb的设置run/run parameters 选项为remote,具体设置如下:
remote path : \\192.168.0.12\bin\tt.exe
remote host : 192.168.0.12
parameters : \\192.168.0.12\bin\tt.exe
勾上Debug project on remote machine
4、这样就OK了,其它的调试就像本地一样。(为了方便,请直接将程序的输出路径设置为\\192.168.0.12\bin\)



BeRoy 2007-12-25
  • 打赏
  • 举报
回复
大概看了一下楼上贴的资料,意思是说,在被调试的机器上安装RemoteDebuger,然后在调试方的IDE中将输出目录设置到被调试的机器上去,主要应该就是那个TDS吧?
感觉这个东西还是有用的啊.
纯冰糖 2007-12-25
  • 打赏
  • 举报
回复
没用过的,Delphi6有这个工具,我copy了他的文档:

-------------------------------


DELPHI/C++BUILDER REMOTE DEBUGGING NOTES


============================================================

SECURITY WARNING:

Running the Remote Debugger allows anyone with a copy of
Delphi or C++Builder to access your computer and run
applications or debug or kill processes.

If the Remote Debugger is started from the command line,
intruders can access processes with the same rights as the
user who started the debugger. If started as a service under
Windows NT or Windows 2000, intruders will also have access
to system services.

Note that this security issue applies only to the Remote
Debugger, not the Local Debugger supplied with this product.


============================================================

These notes explain how to use remote debugging with
C++Builder or Delphi. Run this setup program on all systems
where remote programs will be running. The Delphi or
C++Builder IDE is not required on remote machines.

On Windows NT or Windows 2000, Remote Debugging can be run
either as a program or as a service. On Windows 95 or
Windows 98, it can only be run as a program.

To run as a program, run "bordbg60.exe -listen" from either
a DOS box or a shortcut. If installed as a service,
communication between the debugger and the remote
application is handled automatically.

To start a remote debugging session, use the IDE on your
local machine and set the following options:

For Delphi only:

* Project|Options|Linker
Include remote debug symbols box must be checked.

* Project|Options|Directories/Conditionals
Output directory can be set to a shared directory on the
remote machine. If you do not set this up, you need to
copy the .exe and .rsm files onto the remote machine.

For C++Builder only:

* Project|Options|Directories/Conditionals
Final output directory can be set to a shared directory on
the remote machine. If you do not set this up, you need to
copy the .exe and .tds files onto the remote machine.

For either product:

* Run|Parameters|Remote
Set the Remote Path to the remote directory and .exe name.
Example: d:\temp\proj1.exe, where d:\temp is a directory
on the remote machine. The drive and directory do not have
to match the project directory on the local machine.

* Run|Parameters|Remote
Set the Remote Host to the DNS machine name or to the IP
address of the machine on which you installed the remote
debugger server. If you check Debug project on remote
machine and click OK, all debugger commands start a remote
debugging session for the current project. If you do not
check this option, you must click the Load button on this
dialog to start a remote debugging session. This also lets
you debug an .exe that is already set up on the remote
machine without having to open the project associated with
it.


============================================================

IMPORTANT:

The default installation location for the remote debugging
library file BORDBK60.DLL is:
C:\Program Files\Common Files\Borland Shared\Debugger

The file is installed to this location even if you choose a
different location for the other debugger files during the
installation process. (All other remote debugger files are
installed to a 'bin' directory under the directory you
choose.)

The only case in which BORDBK60.DLL is installed elsewhere
is when the file is already installed and registered to a
different location.


============================================================
Copyright ?2001 Borland Software Corporation.
All rights reserved.

BeRoy 2007-12-24
  • 打赏
  • 举报
回复

这是CB2006的,其他版本也有的
wg961423 2007-12-24
  • 打赏
  • 举报
回复
同样是来接受扫盲的。
CamelFang 2007-12-24
  • 打赏
  • 举报
回复
接分并等待被扫盲.
ydlchina 2007-12-24
  • 打赏
  • 举报
回复
同样是来接受扫盲的。
i_love_pc 2007-12-24
  • 打赏
  • 举报
回复
CB下还真没发现这个东东!!
VSS里倒是有一个,但是没用过!
顺便接点小分!!
yefu2000 2007-12-24
  • 打赏
  • 举报
回复
不懂,等高手
顺便接分~

552

社区成员

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

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