Testing and Debugging Applications on a Device Made for Surface

Testing and Debugging Applications on a Device Made for Surface

To fully test a Microsoft Surface application, you should run the application (which you can do by starting the application from Microsoft Visual C# 2010 Express Edition (or Microsoft Visual Studio 2010), and you should test that the application correctly integrates with Surface Shell. That is, you should test the following items:

  • The application appears and can be started from Launcher.

  • The application correctly closes the loading screen when the application starts.

  • The application orients on the Microsoft Surface screen correctly.

  • All time-outs work properly.

For more information, see the following topics:

You can also use Input Visualizer to test your application.

Ideally, to develop and debug applications directly on a device made for Surface, you should connect an external monitor to the device made for Surface and then configure the monitor as the primary display and the Microsoft Surface screen as the secondary display. (For more information, see Attaching an External Monitor to a Microsoft Surface Unit.) You can then run Visual C# 2010 Express Edition (or Visual Studio 2010) on the external monitor and run and test your Microsoft Surface applications on the device made for Surface. This two-monitor setup enables you to run and debug applications while the device made for Surface is in Windows mode. In this mode, you can fix bugs and recompile your applications more efficiently and you have complete access to all Microsoft Windows functionality.

Without the external monitor, you can still run and test an application by starting it from Visual C# 2010 Express Edition (or Visual Studio 2010). But to test the application with Launcher, you must switch the device made for Surface to Surface mode (You lose all Windows functionality in Surface mode.) You can switch from Windows mode to Surface mode by double-clicking the Enter Surface Mode icon on the Windows desktop, but you must then manually log off the device made for Surface and log on as an administrator.

Debugging and Time-Outs

If your application fails to process an InactivityTimeoutOccurring event because it is stopped in a debugger and the HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Surface\v2.0\Profiles\Xxxx\InactivityTimer\EnableInactivityTimeoutDebugging registry entry is set to 1 (where Xxxx is the appropriate mode profile), Surface Shell will cancel the time-out.

For more information about registry settings and mode profiles, see the topic "Surface Registry Keys" in the Surface Administration Guide.

If the application is not stopped in a debugger, Surface Shell displays the Start over screen and one of the following occurs:

  • In Windows mode, Surface Shell displays the Start over screen until a user selects an option.

  • In Surface mode, Surface Shell waits for a few seconds, and then WM_CLOSE tries to shut down the application. If it cannot shut down the application, Surface Shell then ends the application.

Did you find this information useful? Please send us your suggestions and comments.

© Microsoft Corporation. All rights reserved.
© 2015 Microsoft