WinG will report runtime errors and helpful debugging messages through standard Windows debug output devices (the serial port or applications such as DBWIN.EXE) if you so desire. If you want WinG to send error messages to the debug output, make sure the following entry appears in your WIN.INI file. If there is already a [WinG] section (there will be if WinG has previously profiled your display), just add the Debug=1 line under that heading:
[WinG]
Debug=1
If you specifically do not want debug messages to appear, set this to:
[WinG]
Debug=0
If neither debug level is specified in the [WinG] section of your WIN.INI file, debugging will be turned ON if you're using the Windows debug kernel and OFF if you're using the Windows retail kernel. Setting the Debug level explicitly in your WIN.INI will always override this default behavior.
WinG can also provide you with a detailed log of palette translations between the color table of a WinGBitmap and the logical palette and system palette. This will help to identify discrepancies in the palette which prevent WinG from using faster blts with an identity palette. To receive these palette notifications through the debug output, add the following line to the [WinG] section of win.ini:
DebugPalette = 1
Debugging WinG applications is no different than debugging normal Windows applications, but there are some minor known problems and workarounds for the following debuggers:
Borland Turbo Debugger
There are known problems with debugging WinG applications using Turbo Debugger for Windows. If you have problems debugging with TDW, try running one of the samples first and leave it minimized so that WinG.DLL will already be in memory when you debug your application. There seem to be no problems with the Borland IDE.
Just-in-Time Debuggers
When WinG profiles a display it installs a fault handler to catch any GP Faults caused by WinG or the display driver. Some Just-in-Time debuggers (like CodeView JIT) catch these faults before WinG and kill the profiling window, so WinG doesnt load. These faults should be passed to WinG so it can deal with them appropriately. Either instruct your Just-in-Time debugger to chain the faults through to WinG, or do not run the debugger when WinG is profiling. See Display Profiling.