How to write a debugger for .NET CE?

T

Thomas Hetzer

Hi!

Does anybody have a clue how to implement a debugger for the .net
compact framework (CE)?

The .NET debugging API contains a bunch of COM objects and interfaces
like ICorDebug and so on. But the SDK for Windows Mobile 2003-based
Pocket PCs does not contain the needed include files <cor.h> and
<cordebug.h> and the device seems to have no registry entry for
CLSID_CorDebug.

Is there any way to implement an own debugger for the compact
framework?

Any help would be appreciated.


Best regards,
Thomas
 
D

Daniel Moth

I doubt it. The CF CLR cannot be hosted natively. What are you trying to do?

You can debug a CF application with VS.NET 2003 or with the command line
cordbg; there is a series of blog entries on cordbg for the CF here:
http://blogs.msdn.com/davidklinems/category/5792.aspx

To get some diagnostic info for your app, check out the performance
counters:
http://groups.google.com/groups?hl=...soft.public.dotnet.framework.compactframework

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/netcfperf.asp

Cheers
Daniel
 
B

Brian Smith [MSFT]

The short answer is that it is theoretically possible to write your own
debugger for .NET CF but extremely difficult to do from a practical
standpoint.

The Compact Framework has it's own version of ICorDebug.dll that ships with
Visual Studio and in the future will be available in an SDK for NET CF v2.
It has a different GUID from the one used by full .NET framework and a
debugger can choose to instantiate one or the other. So that part of the
writing a debugger would be fairly staight-forward and somewhat documented.
However, the protocol for launching the application on the device and
communicating with it over the wire is not documented, would not be easy to
make work even with documentation, and has changed between v1 and v2 and
might change some more before v2 is complete. Our hope is that at the time
CF v2 ships there will be an SDK that has some documentation and samples to
make it easier to write third-party debuggers. Until then, I don't think it
would be possible without a lot of effort in reverse-engineering the
protocols or a lot of help from the developement team at Microsoft.

I would second Daniel's suggestion that you look into cordbg as a possible
solution to your problem and consider posting more information about what
exactly you are trying to accomplish and maybe we can come up with some
other suggestions or information.

Brian

--------------------
From: "Daniel Moth" <[email protected]>
References: <[email protected]>
Subject: Re: How to write a debugger for .NET CE?
Date: Tue, 21 Sep 2004 16:23:07 +0100

I doubt it. The CF CLR cannot be hosted natively. What are you trying to do?

You can debug a CF application with VS.NET 2003 or with the command line
cordbg; there is a series of blog entries on cordbg for the CF here:
http://blogs.msdn.com/davidklinems/category/5792.aspx

To get some diagnostic info for your app, check out the performance
counters:
http://groups.google.com/groups?hl=en&lr=&amp;amp;ie=UTF-8&c2coff=1&q=stat+ author:Corbin&meta=group=microsoft.public.dotnet.framework.compactframework
html/netcfperf.asp

Cheers
Daniel

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top