Share via


Set Initial Debug Zones (Compact 2013)

3/26/2014

You can set a debug zone to active by using one of the following three methods:

  1. Set the initial state of the debug zone bit mask when you define dpCurSettings. (You always have to do this when you define dpCurSettings.)
  2. Set a registry key on the development computer.
  3. Set a registry key on the device.

When a module loads, Platform Builder checks options 1, 2, and 3 in that order. However, option 2, the value set in the registry of the development computer, takes precedence. Thus, if you set the registry value in the registries of both the development computer and the device, the value on the development computer is used. Platform Builder queries the value on the device only if it cannot reach the development computer or if the registry on the development computer does not contain a value for the module.

Note

After a module is loaded, none of these options have any effect. If you want to change which debug zones are active after the module is loaded, see the methods described in Change Active Debug Zones.

Each of the three methods is described below.

To set the initial state of dpCurSettings

  • In your module’s code, set the debug zones that are active by default by using the last parameter of dpCurSettings.

    For information about how to define dpCurSettings, see Set Debug Zone Parameters.

To set a registry key on the development computer

  1. On the Start menu, click Run.

  2. In the Run dialog box, type regedit, and then click OK.

  3. In the Registry Editor window, in the left pane, expand HKEY_CURRENT_USER, and then expand the key Pegasus.

  4. Right-click Zones, select New, and then click DWORD (32-bit) Value.

  5. In the Name box, type the name of your module, and then press Enter. Note that in your code, you named your module when you defined dpCurSettings.

    For more information, see Set Debug Zone Parameters.

    Note

    When the module loads, Platform Builder reads the registry key HKEY_CURRENT_USER\Pegasus\Zones and searches for the module name. If a key with the module name exists, SetDbgZone uses the stored debug zone mask to update the debug zone name specified in the dpCurSettings structure.

  6. Right-click the module name, and then click Modify.

  7. In the Edit DWORD (32-bit) Value dialog box, in the Value data box, type a value equal to the debug zone bit mask, and then click OK.

    For example, to turn on the first five debug zones for a module named VoIPPhone, create a VoIPPhone entry with DWORD hex value 0x001F.

  8. In the Registry Editor window, on the File menu, click Exit.

To set a registry key on the device

  1. In Platform Builder, open your OS design project.

  2. In Solution Explorer, expand the OS design project node, and then expand the Parameter Files directory.

  3. Under Parameter Files, double-click OSDesign.reg.

  4. In the OSDesign.reg pane, right-click HKEY_LOCAL_MACHINE, click New, and then click Key.

  5. Type DebugZones and press Enter.

  6. Right-click DebugZones, click New, and then click DWORD Value.

  7. Type the name of the module and press Enter.

  8. In the Properties pane for the module’s registry value, for Data or Hex Value, type a DWORD value equal to the debug zone bit mask.

    Important

    If you set that particular registry value on the development computer, use the same registry value on the device as you did on the development computer.

    For example, to turn on the first five debug zones for a module named VoIPPhone, create a VoIPPhone entry with a DWORD hex value 0x001F.

  9. Save and then build the OS design project.

See Also

Concepts

Use Debug Zones
Kernel Debugger
Debugging

Other Resources

Windows Embedded Compact 2013