How To Enable DEBUGZONEs in the Registry (267296)



The information in this article applies to:

  • Microsoft Windows CE Operating System, Versions 2.12
  • Microsoft Windows CE Operating System, Versions 2.11
  • Microsoft Windows CE Operating System, Versions 3.0

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:
  1. 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.
  2. Connect to your target by using CESH (CE shell) for downloading your image.
  3. Use the gi command in CESH to list the modules (for example, dhcp.dll, snmp.dll, and so forth).
  4. 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.
  5. 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:

    [HKEY_LOCAL_MACHINE/DEBUGZONES] "DHCP"=DWORD:00FF "SNMP"=DWORD:FFFF "AFD"=DWORD:F0E2

    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.
  6. Now, rebuild the image by using a makeimg command in your build window.
  7. When the new image is booted, the debug output shows all the debug zone messages in the debug output terminal.

REFERENCES

PlatformBuilder 2.11 Books Online PlatformBuilder 2.12 Books Online

Modification Type:MinorLast Reviewed:10/11/2004
Keywords:kbhowto KB267296