Microsoft KB Archive/267296

= How To Enable DEBUGZONEs in the Registry =

Article ID: 267296

Article Last Modified on 10/11/2004

-

APPLIES TO


 * Microsoft Windows CE 2.12 for the Handheld PC
 * Microsoft Windows CE 2.11 for the Handheld PC
 * Microsoft Windows CE 3.0 for the Handheld PC

-



This article was previously published under Q267296



SUMMARY
When you debug an application or a driver, you often need to activate the debugging messages produced by the DEBUGZONE mechanism. This article describes various methods that you can use to active the debugging messages.



MORE INFORMATION
To enable debug zones in a module please use the following steps:  Create a debug build by setting WINCEDEBUG=debug (or selecting Debug from the IDE). You do not necessarily need source code because the binaries for both retail and debug are available in the tree. These flags just pick the right set. Connect to your target by using CESH (CE shell) for downloading your image. Use the gi command in CESH to list the modules (for example, dhcp.dll, snmp.dll, and so forth). Use the zo command at the CESH command prompt to enable the debug zones on the modules you want. For example, type:

zo m 10

to list the debug zones for module 10, and then type:

zo m 10 on 3 4 5

to switch on debug zones 3, 4, 5 on module 10. Now you can see these debug zone messages on the debug output port (on your serial terminal emulator connected to your debug port or the debugger window in Platform Builder's development environment).

You can also set the zones statically in the OS image. To do this, put the following in one of the *.reg files, such as project.reg:

The left side of the keys are the registered names that appear in the zo command, and the numbers on the right side are the lower 16 bits of the CurZone value, which is the debug zone bitmask. Each binary 1 represents one of the zones that is set ON. So, if CurZone = 0000F0E2, then pick the lower half which is F0E2. Now, rebuild the image by using a makeimg command in your build window. When the new image is booted, the debug output shows all the debug zone messages in the debug output terminal.</li></ol>

<div class="references_section">