HOWTO: Remotely Debug a Win32s Application using WinDBGLast reviewed: October 10, 1997Article ID: Q133061 |
The information in this article applies to:
SUMMARYDebugging Win32-based applications under Windows 3.1 with Win32s can be difficult because the debugging tools are complex and the procedure is not well documented. There are several choices in debugging a Win32s application that are listed in the following Knowledge Base article:
ARTICLE ID: Q102430 TITLE : HOWTO: Debug 32-bit Applications under Win32sThis article describes one of the choices, namely how to remotely debug a Win32s application using the remote WinDbg tool (Wdbg32s.exe). Remote debugging requires two machines: a Win32s machine to run the Win32-based application and the remote debugger, Wdbg32s.exe and a Windows NT machine to run the WinDbg debugger. Note that this method (remote debugging a Win32s application using WinDBG) only works with WinDBG that is included in the Win32 Software Development Kit (SDK) shipped with Windows NT version 3.51. The Win32 SDK that is shipped with Windows NT version 4.0 does not support remote debugging a Win32s application using WinDBG. This version of the SDK does not include the required Win32s components of WinDBG for remote debugging. In addition, future versions of the Win32 SDK will also not contain these components required for remotely debugging a Win32s application. You can also remotely debug your Win32s application using the Remote Debug Monitor tool (Msvcmon.exe) that is only shipped with the Win32s files that are included with Visual 32-bit Edition versions 2.x, 4.0, and 4.1. For more information on this method, please refer to the following Knowledge Base article:
ARTICLE ID: Q131058 TITLE : Tips for Remote Debugging with Visual C++ 2.x and 4.0 MORE INFORMATION
Preliminary IssuesFirst, before you start to remotely debug a Win32-based application under Win32s, make sure that it runs correctly under Windows NT and track down any problems using either the WinDbg or NTSD debugger that ships with the Win32 Software Development Kit (SDK) or the Visual C++ debugger. In addition, explore some of the other choices of debugging the Win32s application as described in the article referenced above. If none of these methods work for you, then you should remotely debug your application using the method described here. Second, you must use a null modem (3-wire) cable to create a valid connection between the two machines (the host Windows NT machine and the target or remote Win32s machine) and make sure that the cable is set up exactly as specified in the Win32s Programmer's Reference. Third, you must make sure you have a valid connection between the two machines you are using. One way you can test this functionality is by using the terminal emulator found in the Accessories group. If you can send text over the serial line then you have a valid connection. If you do not have a valid connection, make sure the correct COM ports are selected, and verify that the baud speed is the same on both machines. Finally, for debugging with WinDBG, your Win32-based application and/or DLL must be built with certain compiler and linker switches so that debugging information is included. These switches can be found in the $(cdebug) and $(ldebug) macros, respectively, which are defined in Ntwin32.mak. It is also important to disable optimization with -Od or locals will not be available in the locals window and line numbers may not match the source. For more information on debugging with WinDBG, please refer to the following Knowledge Base article:
ARTICLE ID: Q97908 TITLE: Debugging DLLs Using WinDbg Procedure for Remote DebuggingNote that remote debugging with WinDBG only works for serial transports. The following steps outline the procedure:
|
Additional query words: thunk tshoot trace windbg windbgrm wdbg dbwin
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |