Monday, February 23, 2015

Disabling the Windows Phone frame rate numbers display while debugging

While debugging Windows Phone Apps, there will be some (weird looking) running numbers on the right side of the app's screen, as shown in the screen shot below.

These are actually frame rate counter numbers to aid in debugging. They can be easily switched off if you do not want them on the screen, especially if you want to capture the screen. To turn it off, just do the following:

  1. In Visual Studio, open up the project's App.xaml.cs file in the editor.


  2. Look for the following lines:

    if (System.Diagnostics.Debugger.IsAttached)
    {
    this.DebugSettings.EnableFrameRateCounter = true;
    }

  3. Change them to the following:

    if (System.Diagnostics.Debugger.IsAttached)
    {
    this.DebugSettings.EnableFrameRateCounter = false;
    }

  4. Run and debug the app again.

    The frame rate numbers are no longer displayed.


No comments: