PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Debug Output to Visual Studio
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Debug Output to Visual Studio
![]() |
Debug Output to Visual Studio |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
I'm trying to get debug output sent from my CF1 application to the output
window in Visual Studio. System.Diagnostics.Debug.WriteLine doesn't work. Calling OutputDebugStringW or NKDbgPrintfW in coredll similarly produces no output. I see this comment in OpenNETCF.Diagnostics.DebugMessage: "... applies only to generic CE devices. Most commercial Pocket PC and SmartPhone devices do not expose a debug port." But I see output pertaining to my application's execution (first chance exceptions, etc.) in the VS output window. Can anyone shed any light? Thanks! -- David |
|
|
|
#2 |
|
Guest
Posts: n/a
|
You've not said what version of Studio, but I know Studio '03 did not have
the ability to pipe messages back to Studio. '05 definitely does (I know for certain with the CF 2.0 projects anyway - I assume the CF 1.0 ones also work). -- Chris Tacke, Embedded MVP OpenNETCF Consulting Managed Code in an Embedded World www.OpenNETCF.com "David" <guiness@nospam.nospam> wrote in message news:504086F3-97E4-4D61-96AF-B4B1840AD0AB@microsoft.com... > I'm trying to get debug output sent from my CF1 application to the output > window in Visual Studio. > > System.Diagnostics.Debug.WriteLine doesn't work. Calling > OutputDebugStringW > or NKDbgPrintfW in coredll similarly produces no output. > > I see this comment in OpenNETCF.Diagnostics.DebugMessage: "... applies > only > to generic CE devices. Most commercial Pocket PC and SmartPhone devices do > not expose a debug port." > > But I see output pertaining to my application's execution (first chance > exceptions, etc.) in the VS output window. > > Can anyone shed any light? > > Thanks! > > -- > David > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
I'm using VS 2005, and the device is connected via USB.
Even if it was a CF1 issue I'd still expect OutputDebugStringW or NKDbgPrintfW to work. David |
|
|
|
#4 |
|
Guest
Posts: n/a
|
> Even if it was a CF1 issue I'd still expect OutputDebugStringW or
> NKDbgPrintfW to work. Why? Thos get routed to the device debug port, which is platform dependent. CE devices usually run it out a serial port. There's nothing that says that NKDbgPrintfW should pipe its output to CoreCon and back to Studio. I've never seen it work in a Pocket PC/WM device (I wrote the call, and the caveat, in the SDF for vanilla CE development). -- Chris Tacke, Embedded MVP OpenNETCF Consulting Managed Code in an Embedded World www.OpenNETCF.com |
|
|
|
#5 |
|
Guest
Posts: n/a
|
"<ctacke/>" wrote:
> > Even if it was a CF1 issue I'd still expect OutputDebugStringW or > > NKDbgPrintfW to work. > > Why? Because OutputDebugStringW works fine when debugging my unmanaged code. David |
|
|
|
#6 |
|
Guest
Posts: n/a
|
Interesting. All I can guess is that the CF projects use a different
mechanism of communicating back to Studio (no idea why they would do that, but it appears they must). I know it works with CF 2.0 (and I could swear it did with CF 1.0 in Studio '05). -- Chris Tacke, Embedded MVP OpenNETCF Consulting Managed Code in an Embedded World www.OpenNETCF.com "David" <guiness@nospam.nospam> wrote in message news:C2E44808-A4A5-4DD8-8549-4A00C0277816@microsoft.com... > "<ctacke/>" wrote: > >> > Even if it was a CF1 issue I'd still expect OutputDebugStringW or >> > NKDbgPrintfW to work. >> >> Why? > > Because OutputDebugStringW works fine when debugging my unmanaged code. > > David > |
|
|
|
#7 |
|
Guest
Posts: n/a
|
I just noticed that if I debug an unmanaged DLL that is loaded by my managed
app, then all the managed app's calls to System.Diagnostics.Debug.WriteLine show up in the VS2005 output window. I guess I can use this as a workaround... -- David |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

