Appendix C Windows Debugging Version

The debugging version of the Microsoft Windows operating system generates diagnostic messages whenever it encounters an error that would otherwise cause the system to fail. You use the debugging version by itself or in conjunction with a debugger to debug Windows applications and dynamic-link libraries (DLLs). The debugging functions described in this appendix are not available in the retail version of the system: The API elements exist, but they have no effect. However, the retail version of Windows version 3.1 contains parameter-validation capabilities that an application can use with the Tool Helper library (TOOLHELP.DLL) to retrieve system errors and information about invalid parameters. For more information about the Tool Helper library, see the Microsoft Windows Programmer's Reference, Volume 1.

The debugging version of Windows consists of the executable and symbol files for the GDI, KERNEL, and USER modules. These modules are identical to those provided with standard Windows except that they contain extra code that checks for errors and then reports them.

The best way to use the debugging version of Windows is to install it on a computer you use for testing and debugging and use a second computer for development. Output from the debugging system and debugger can be directed to a debugging terminal.

Developers who write and debug applications on a single computer often place copies of the standard and debugging versions of Windows in separate directories. When they need to switch from one system to the other, they use batch files to copy the appropriate files to the Windows system directory. (Switching between systems is a good idea because the standard Windows system is faster that the debugging version—it is a better environment for compilers and editors.) You can use the installation program supplied for the Microsoft Windows Software Development Kit (SDK) to set up this two-directory system and then use the batch files D2N.BAT and N2D.BAT to switch between the debugging and standard versions of Windows.