Thursday, May 24, 2012

Showing Console output in Windows Phone 7 Emulator

Sometimes its useful to see some debug output from the internals of your WP7 App without attaching a debugger.

One such time was this morning - where I wanted to trace the memory used in a BackroundAgent in the app I was building:

            string.Format("Peak memory usage {0}"DeviceStatus.ApplicationPeakMemoryUsage);

... and I wanted to trace that in release mode without the debugger attached.

So... to enable console output...

  • in Win32, set the registry key:

  • in Win64, set the registry key:

Then use Console.WriteLine in your app.

Then restart the emulator - a console window will start along with the emulator and then the output will magically appear:

Note: if you use both Console.WriteLine  and Debug.WriteLine in your code, then both will get output when you use the DEBUG build - so you will see every message twice.

For more info, check out: and a gem hidden in the middle of

1 comment:

  1. Hey I like this post on WinPhone Emulator, actually had a question in reference to other information I've read on the subject. e-mail me: williams(at)dzone(dot)com