The information in this article applies to:
- The development environment included with:
- Microsoft Visual C++, 32-bit Edition, versions 2.0, 2.1, 4.0, 4.2, 5.0
SUMMARY
Chapter 14 of the Visual C++ User's Guide for Visual C++ version 2.x and
chapter 17 of the Visual C++ User's Guide for Visual C++ version 4.0
describe how to install the Remote Debug Monitor (MSVCMON.EXE) and how to
configure the remote connection. Query on "Remote Debug" if you are using
Visual C++ version 5.0. This article provides further details and gives two
methods to help you get started. Note that Visual C++ versions 4.2 and 5.0
do not support WIN32S and Macintosh platforms. Version 5.0 does not support
Serial connection.
MORE INFORMATION
The remote debug monitor is a small program on the target computer that
communicates with the debugger and controls the execution of the program
you are debugging.
To install the remote debug monitor:
- On a Windows 95 or NT computer, the remote debug monitor consists of
the following files: MSVCMON.EXE, MSVCRT40.DLL, TLN0COM.DLL, TLN0T.DLL,
and DMN0.DLL. Copy these files to the remote computer. If you are using
Visual C++ version 5.0, then copy MSVCMON.EXE, MSVCRT.DLL, TLN0T.DLL,
DM.DLL, MSVCP5O.DLL and MSDIS100.DLL to the remote computer. If remote
computer is NT 4.0, then copy PSAPI.DLL also.
- On a Win32s computer, the remote debug monitor consists of MSVCMON.EXE,
TLW3COM.DLL, and DMW3.DLL. These files are installed automatically
during setup.
- On a Macintosh, the remote monitor is a control panel, called VC++ Debug
Monitor, installed automatically by the Visual C++ for Macintosh setup
program.
- On a Power Macintosh, the remote debugger is an application, called VC++
PowerMac Remote Monitor, installed automatically by the Visual C++ for
Macintosh setup program. Setup also installs the following files: VC++
Power Macintosh File Utility, VC++ Power Macintosh ADSP Transport, VC++
Power Macintosh TCP/IP Transport, and VC++ Power Macintosh Serial
Transport.
Method One - Windows NT host, Win32s remote.
If you are using Visual C++ versions 4.2 and 5.0, the host and remote
machines can be either a Windows NT machine or a Windows 95 machine, as can
the local machine. Therefore, the project can reside in the local machine
of your choice.
- Setup a shared directory that both the local Windows NT machine and the
remote machine can view. The shared directory can be on either machine
or a network drive. The easiest option is to share the directory on the
local Windows NT machine which contains the project's executable.
- Load the project into the Visual C++ development environment running
on Windows NT.
- Open the Project Setting dialog box. (In Visual C++ 2.x, choose Settings
from the Project menu; in Visual C++ 4.0, choose Settings from the Build
menu; in Visual C++ 5.0, choose Settings from the Project menu.) Select
the Debug tab. Set the following sections:
- Executable for Debug Session: Enter the name and path of the
executable as the local Windows NT computer sees it.
- Additional DLLs: Enter the name and path of any DLLs as the local
Windows NT computer sees them.
- Remote Executable Path: Enter the name and path of the executable as
the remote computer sees it.
- Working Directory: Should be blank.
- Start the remote debugger on the remote computer by starting
MSVCMON.EXE. For the Win32s platform, find the Visual C++ Win32s program
group, and select the Visual C++ Debug Monitor icon. Choose the connect
button to start the connection.
- On the Windows NT host computer, check the connection information.
In the Visual C++ 2.x, choose Options from the Tools menu. Then select
the Debug tab. Make sure Remote Debugging is selected. Choose the
Connections button, and confirm the type of connection. Also, select
Settings and confirm the settings.
In Visual C++ 4.0, choose Remote Connection from the Tools menu. Confirm
the choices for Platform and Connection. Select Settings to configure
the specified connection.
In Visual C++ 5.0, choose "Debugger Remote connection" from the Build
menu. Choose Network (TCP/IP ) then Settings. Enter remote machine name
or IP address, no password needed. You can ignore the symbolic
information not found messages for the system DLLs when the debugger is
started in Step 6 below.
NOTE: For Intel (x86) machines, Visual C++ 2.x only supports remote
debugging via serial connections. In Visual C++ 4.0, it is possible to
debug using a network connection with TCP/IP except on Win32s, which
requires a serial connection.
- Start Debugging.
Method Two
If you can't make a shareable directory, copy the executable and any
needed DLLs to the remote computer. With this method you need to be sure
that the executables and DLLs are re-copied whenever changes are made.
All the other steps remain the same.
Troubleshooting
If the development environment can't find the executable, make sure the
correct directories for the correct computers are given in step 3.
Since Visual C++ version 5.0 supports only TCP/IP connection, check for
correct machine name and proper network connection with TCP/IP protocol
available. The following troubleshooting does not apply to version 5.0.
If the connection fails:
|