Microsoft Windows CE 3.0  

Debugging MSMQ Installations

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Effective with version 3.0, Windows CE 3.0 includes a debug version of MSMQ, which simplifies the task of debugging network connections and MSMQ applications. This debug version is also available in the MSMQ add-on pack. The debug version contains many asserts and checks on the consistency of the MSMQ internal and external data and can generate a trace of operations as they are performed. On systems that support a console, the debug version has a command monitor that allows you to view the MSMQ internal data structures.

Note   Always disable debugging output before resetting the device, since some debug options can prevent the system from rebooting. For example, if the device is not connected to a network, enabling serial port debug output can cause the system to block in the initialization thread at startup. Enabling text output will cause the system to crash on startup because the console driver has not yet been initialized. In both instances, however, cold booting will restore the device.

To install the debug build

  1. Stop MSMQ.
  2. Rename \Windows\msmqd.dll to \Windows\msmqd.dll.old.
  3. Copy the debug build of msmqd.dll to \Windows.
  4. Restart the system.
  5. Start MSMQ.

    To select the output method for debugging information, set the registry key DebugOutputChannels value to 0x1 for console output or 0x2 for output to a log file.

    The Console and Log File components are available for tracing by setting the DWORD value DebugOutputMask to any combination of items in the table below.

    Value Item
    VERBOSE_MASK_API 0x00000001
    VERBOSE_MASK_QUEUE 0x00000002
    VERBOSE_MASK_SESSION 0x00000004
    VERBOSE_MASK_PACKETS 0x00000008
    VERBOSE_MASK_CURSORS 0x00000010
    VERBOSE_MASK_ORDER 0x00000020
    VERBOSE_MASK_IO 0x00000040
    VERBOSE_MASK_FILE 0x00000080
    VERBOSE_MASK_INIT 0x00000100
    VERBOSE_MASK_WARN 0x00004000
    VERBOSE_MASK_FATAL 0x00008000

    Console

    On platforms that support the console, the debug version of MSMQ can create a console window with a rudimentary monitor prompt that allows you to see the values inside MSMQ internal structures. The console can be turned on only by running the Console command in MSMQADM. Once you see the prompt, the Help command will give you the list of currently supported monitor commands.