Thursday, December 02, 2010
Hiding/Showing Windows Phone 7 Emulator Performance Count Numbers
When you run your application in the Windows Phone 7 emulator, you are likely to see performance counters down the right side of the emulator display:
It may be a bit difficult to see it in this image, so here is a version zoomed in on those numbers:
These numbers are very useful, since they give you interesting performance information. However, at times you may not want them. In particular, I find them problematic when I need to take screen shots of my app in the emulator. So the question is: How do you turn them off?
To answer that question, let’s first examine why they are showing up in the first place. As it turns out, these numbers are added by the debugger. So whenever you start an app in debug mode, these numbers show up. Since most people simply hit F5 in Visual Studio to start a debug session, they see these numbers most of the time. However, if you simply launch the app without the debugger attached (by hitting CTRL+F5 for instance), the numbers are gone:
Another option is to launch your app in debug mode, then hit the Windows symbol (the middle hardware button) to go back to the home screen. Since the phone is not multi-tasked, this shuts down the app, which forces the debugger to detach. If you then click the icon of your app again to go back into your app, you are running without the debugger and thus the numbers are gone in this scenario as well. This particular option is more likely to happen by accident though :-)
There you have it! Perf numbers are gone and you are ready to take your pristine screen shots.
Note: I actually needed this when I took a panomara screen shot of the CODE Magazine Windows Phone 7 app. Taking panorama screen shots is a whole different problem in itself. I blogged about it here.
Posted @ 7:22 PM by Egger, Markus (firstname.lastname@example.org) -