This documentation is archived and is not being maintained.

Differences Between Device And Desktop Debuggers 

Device debuggers support most of the same features that desktop debuggers support, with the following exceptions.

Edit and Continue Not Supported

Device debuggers do not support the ability to edit the source and continue while in break mode. If you want to modify your code while debugging, you need to stop debugging, edit your code, and then restart with the modified sources. If you try to change your code while in break mode, the debugger issues a warning.

Function Evaluation Not Supported in Native Debugger

The native device debugger does not support function evaluation. You cannot type in an expression that has a function in it and have the function evaluated and results returned.

The managed device debugger does support function evaluation.

Interop Debugging Limitations

You cannot debug native and managed code within a single instance of the debugger.

To debug applications that have mixed native and managed code (or managed code that uses pInvoke), set breakpoints in each section where you want to begin stepping through your code. Then attach whichever debugger is required for a certain section (for example, a managed section). Detach that debugger and attach the other when the other is needed. You can repeat these detach/attach steps as often as necessary to step through your program. For more information, see Walkthrough: Debugging a Solution That Includes Both Managed and Native Code.

Using the two debugging instances at the same time on the same process is currently not supported.

Attribute-Based Debugging Not Supported

The .NET Compact Framework does not currently support attribute-based debugging. Thus, the ability to define attributes for visualizers and so on, is not available for users of the device debuggers.

Desktop Debugging Not Supported

You cannot use the device debuggers to debug applications written for the desktop. Use the desktop debuggers instead.

Kernel Debugging Not Supported

You cannot use the device debuggers for kernel debugging.

Just My Code Debugging Not Supported

You cannot use Just My Code debugging.

Runtime Debugger (Cordbg.exe) Additions

The Runtime Debugger helps tools vendors and application developers find and fix bugs in programs that target the .NET Framework common language runtime (CLR). Device projects add a new command and a new mode argument to the Runtime Debugger. The syntax for the new command and mode argument (inside a Cordbg.exe session) is described in the table below.

For more information and complete syntax, see Runtime Debugger (Cordbg.exe).

Command Description

m[ode] EmbeddedCLR {0|1}

EmbeddedCLR is a mode argument that sets the debugger to target device projects. To control this setting, specify 1 for on or 0 for off.

conn[ect] machine_name port

Connects to a remote embedded CLR device.



Required. The name or IP address of the remote computer.


Required. The port to use to connect to the remote computer.

Connection Issues

Turning off the device while the debugger is running causes the debugger to close because of the connection failure. The connection failure occurs because the application is still running in the background on the device. The X button on the Pocket PC is a smart minimize feature and does not close the application. Instead it sets the application to run in the background.

To properly close an application running in the background on a Pocket PC, on the Start menu, tap Settings, tap the System tab, and then tap Memory. On the Running Programs tab, tap the application that you want to close, and tap Stop.

See Also