Domanda

I'm doing debugging of a Windows Mobile 6.5 application, using Visual Studio 2008, and it'd be nice if I could get console output while the program runs. How can I read the output of printf, from code running on the emulator, in the Visual Studio IDE?

È stato utile?

Soluzione

Windows Mobile has no console nor console output. You may install a console, http://windowsmobilepro.blogspot.de/2006/05/pocket-pc-console-for-standard-input.html and http://handheld.softpedia.com/get/System-Utilities/Enhancements/MS-Console-69411.shtml

But for debugging I want use these.

Instead of printf use either DEBUGMSG or RETAILMSG. For example:

DEBUGMSG(1, (L"Function x: Lasterror was 0x%08x\n", GetLastError()));

You can also attach debug later to a running app and then watch VisualStudio Output window for debug messages.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top