不是特别复杂。大体给你讲一下,主要有几点要注意的。
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.
===================================================================
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.
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.