If you write Program There is no problem in local compilation and running, but an exception occurs when it is released to another machine. The machine running the program has no installation and debugging period. In this case, remote debugging is required. Remote debugging can be performed on VC 6.0, but certain environment structures are required. See the following:
1. There are two machines: machine A (Local Machine) and machine B (remote). Machine A is installed with Visual Studio 6.0, and machine B is not installed.
2. files required by machine B Msvcmon. EXE, DM. dll, msdis110.dll, tln0t. dll (In common/msdev98/bin under the installation directory of Visual Studio 6.0 on machine)
3. Copy the above files to a directory on machine B (for example, // B/C $/remotedebug /)
4. on Machine A, open VC 6.0, open the project to be debugged (for example, the project name is remotedebug), set the breakpoint, and after compilation, copy the debug/remotedebug.exe file under the project directory to a directory of machine B (for example, // B/C $/remotedebug /). Set the IDE environment of VC 6.0 as follows:
A) choose build> set Active configuration> [project name]> Win 32 debug. Click OK
B) choose build> debugger remote connection> network (TCP/IP), select settings in the dialog box, enter the IP address of machine B in the target machine name or IP address, and click OK.
C) In the menu project-> Settings-> debug tab, the default category is general, enter the local path of the debugging program in the executable for debug SESSION (for example, debug/remotedebug.exe under the project directory opened by vc6.0 ). In remote executable path and name, enter C:/remotedebug/remotedebug.exe (the actual path on machine B ).
D) In Step C) after setting, select additional DLL for category and set the DLL required for running the program. (This step can be ignored temporarily. When debugging, the debugger will ask about the dll path)
5. run the msvcmon mentioned in step 2 on machine B. EXE program, select settings in the dialog box, enter target machine name or address (enter the IP address of machine a here), click OK to return, and click Connect. Machine B has been set up)
After completing the settings, set the breakpoint in the IDE environment of host a VC, and press F5 to debug. At this time, the Program on machine B will be run. If the program runs at the breakpoint, the VC ide of machine A will be activated and can be tracked in one step.
Note:
1. directories with the same region are displayed.
2. If remotedebug.exeuses another dll, the other dllwill also be stored in the same directory as remotedebug.exe on the bhost.
3. when running the VC on machine A, some dialog boxes may pop up, saying that the local DLL does not contain the debug information, or the local dll version is different from the remote dll version. You can click OK to ignore it.
4. This article applies to Visual Studio 6.0. For more information about VC versions, see mdsn.