Getting help from the Doctor (Dr Watson that is!)

You cannot ship a device connected to the debugger so eventually you will have to cut the cord and run your device standalone. Windows mobile ships a pocket version of Dr Watson that can help evaluate application exceptions that occur while in this unconnected state. Dr Watson already deals with the heavy lifting of logging the exception and providing a debuggable kernel dump – all you need to do is to get these dump files into your release directory for debugging. The default values I like to change are:


HKEY_Local_Machine\System\ErrorReporting\DumpSettings\DumpDirectory = \<storage card name>\DumpFiles

HKEY_Local_Machine\System\ErrorReporting\UploadSettings\DontUpload = 1   


Changing these settings will write .kdmp files to your storage card and Watson won’t attempt to upload the files to the Watson server. Additionally, the Watson UI will not be displayed – so don’t be surprised if you no longer see the dialog prompting you to report the errors found. By logging to an external storage card, you can simply remove the card after any Hopper run and view the exceptions that occurred on that device – you will need to look carefully since the DumpDirectory is hidden.


There are additional settings you can play with (like MaxDiskUsage and MaxLogFiles), but in general the Watson documentation is excellent (search for “Error Reporting”) and won’t need repeating here.


Once the kdmp file is in your release directory, it is possible to connect the debugger directly using the PMD (Post Mortem Debugger) available on JetStream for your Windows Mobile partners. The dump provides a snapshot view of the exception including the call stack, disassembly and the register values – basically enough information to solve most program exceptions that may occur on your device.

Comments (11)

  1. shende says:

    What is the PMD debugger?

  2. roboform says:

    [Not about this topic]

    I have a most basic question:

    How can I judge the Hopper.exe is stopped?

    Many time I meet that the hopper has halt and the LCD has turned off, no response appear when I stoke the keypad. but after a while, Hopper.exe will re-work. So I have this question. Could you tell anything about this?


  3. shende says:

    I can try to help and much depends on the platform the platform. Hopper has a visual clue to determine if its running – there will be a flashing 5 pixel box in the upper left of the screen. If its not flashing, Hopper is not running (likely device hang). If the box is blinking then Hopper is happily sending keys to your device.

    Sometimes you will need to press a key to activate the device LCD to see if it is responsive. Pocket PC device should never suspend during a Hopper run so this should not be the problem.

  4. kevin says:

    Where is the "post mortem debugger" located? What do you mean by saying that it’s "available on JetStream for your Windows Mobile partners?" I’ve never heard of this. Thanks, kevin

  5. shende says:

    Kevin, Jetstream is a resource reserved as a conduit to deliver product to our Windows Mobile Partners. The PMD, as well as your AK’s, LTK and other Microsoft services are available from this location.

    If you are a registered Windows Mobile partner, then this resource will be available to you and your account representative can help you with the connection. Please notify me if you are having any troubles accessing this resource and I can help.

    If you are not a Windows Mobile partner, you are unfortunately prevented from accessing this site. Hopper will only run on Windows Mobile so I can make certain assumptions regarding the audience of this site – my apologies if this is misunderstood.

    If there is enough interest in the general embedded area, perhaps I will blog about creating Hopper-like stability tools for non-WM platforms.

  6. I saw a post on one of our development forums asking how to debug a crash dump file (e.g. foo.kdmp)….

  7. Is there a document defining the .kdmp file format says:

    I am working with .kdmp files every day and I

    need a more efficient way to analyze the data than platform builder

  8. shende says:

    Sorry, but I am not aware of a document describing this format. My suggestion would be to investigate the debugger extensions that are both documented and very powerful. The extension should allow complete access to the kdmp file.

  9. bgeenen says:

    It took some digging, but I think this is the tool that people are asking about.

    Windows CE Dump Viewer

    Brief Description

    Windows CE log dump tool



  10. alexei says:

    I use WinDbg to analyze .kdmp files generated in WM5. It shows well the stack trace and source locations, however I could not manage to work locals/watch windows. Though all my variable symbols are certainly present in .pdb files, the debugger attempts to look at "symbols.pri" which is not generated.

    Unable to enumerate locals, Win32 error 318

    Private symbols () are required for locals.

    Type ".hh dbgerr005" for details.

  11. Rashmi says:

    Hey, I am trying to get the .kdmp file by modifying the registry entries as you have mentioned. I see them modified in the regini.ini also. But I dont see them getting modified in the final image that I download, when i see in the remote registry editor. Can you help me find out the reason?

Skip to main content