This article was previously published under Q104156
This article has been archived. It is offered "as is" and will no longer be updated.
The Microsoft Windows debugging tools listed in this article may help youdebug and troubleshoot problems such as general protection (GP) faultsthat you encounter while in Visual Basic or while executing a compiledVisual Basic program.
None of these tools are included as part of the Microsoft Visual Basicprogramming system for Windows, but they are readily available from othersources as listed in each tool's description. You can use these tools todebug many different problems, including but not limited to GP faults.
The following tools may help you debug your Visual Basic programs. A briefdescription of each tool is given below. For more information, review theMicrosoft Windows Software Development Kit (SDK) documentation.
Dr. Watson for Windows (DRWATSON.EXE)
This tool comes with Microsoft Windows version 3.1. It is located in the\WINDOWS directory. This is a diagnostic tool for the Microsoft Windowsoperating system. It detects system and application failures caused byWindows applications and can store information in a disk file called a logfile. There is more information in the Programming Tools Manual in Chapter6 of the Microsoft Windows Software Development Kit for Windows 3.1.
CodeView for Windows (CVW.EXE)
This tool comes with the Microsoft Windows Software Development Kit forWindows version 3.1. You cannot use this tool to debug Visual Basicprograms, but you can use it to debug dynamic link libraries (DLLs) usedby Visual Basic. For example, you can use this tool to test the executionof your application and examine your data simultaneously.
You can isolate problems quickly because you can display any combinationof variables, global or local, while you interrupt or trace anapplication's execution. For information on how to use CodeView forWindows, query on the following words in the Microsoft Knowledge Base:
codeview and visual and basic
Also, there is more information in the Programming Tools Manual in Chapter4 of the Microsoft Windows Software Development Kit for Windows 3.1.
Heap Walker (HEAPWALK.EXE)
This tool comes with the Microsoft Windows Software Development Kit forWindows 3.1. Use it to test how memory is being allocated. It checksmemory by examining the global heap (the system memory that the Windowsoperating system uses), local heaps used by active applications, andDLLs in your Windows system.
Heap Walker is useful for analyzing the effects your application has whenit allocates memory from the global heap or when it creates user interfaceobjects or graphics objects. There is more information in the ProgrammingTools Manual in Chapter 9 of the Microsoft Windows Software Development Kitfor Windows 3.1.
Microsoft Windows SPY (SPY.EXE)
This tool comes with the Microsoft Windows Software Development Kit forWindows 3.1. Use it to test or monitor messages sent to one or more windowsin Microsoft Windows and to examine the values of message parameters. Formore information, see the Programming Tools Manual in Chapter 7 of theMicrosoft Windows Software Development Kit for Windows 3.1.