Tuesday, November 27, 2012

Deploying and Debugging Windows Store Apps on a Microsoft Surface RT Tablet

RemoteDebug_Surface_09

Playing with devices is cool and the most fun is to develop cross device applications. Think phone to phone and phone to tablet apps. One of the key things you need to do is to be able to deploy, debug and test your apps on the available hardware, and no Windows Store app is ready until you test it on a Surface RT tablet.

Here’s a quick rundown of the steps":

  • Check/Update your dev machine tools
  • Download and Install the VS2012 Remote Debugger Tools on the Surface.
  • Run the Remote Debugger Tools on the Surface (let it configure the Windows Firewall settings).
  • In VS2012, set the debugger to Remote Machine and select/enter your Surface device address.
  • From VS2012, run the Windows Store app. It will be remotely deployed and run on the Surface.

If you would like a little more detail and some screenshots of the whole process, keep reading !

visualstudio_logo

Step 1: Setup your development machine
First of all, you need to make sure you have the proper development environment. You need a Windows 8 (the Pro or any active evaluation version you might be using) machine with Visual Studio 2012. You also need your developer license.

Screenshot (1)

Screenshot (2)Screenshot (3)Screenshot (4)

Step 2: Download the Remote Debugger Tools 
You need to download and install the Visual Studio 2012 Remote Debugger Tools on your Surface RT tablet. The tools are available for ARM, x64 and x86 devices, so you are able to deploy and debug not only in the Surface, but also on any Windows RT and Windows 8 device (both 64bit and 32bit versions). The tools will enable the installation of the developer license on the Surface RT (which can’t run Visual Studio) and also allow you to deploy and profile the performance of your Windows Store apps.

Screenshot (5)

Screenshot (6)

Screenshot (7)

Step 3: Run the Remote Debugger Tools
Once you have the tools installed run the program. You can open the charms bar and use the search charm to look for the app. The first time you run the tools it will need to configure the Windows Firewall settings to be able to connect with other machines in the network. This program will maintain a server running waiting for connections.

RemoteDebug_Surface_03

RemoteDebug_Surface_02

RemoteDebug_Surface_08

Step 4: Configure remote debugging in Visual Studio
Now you can turn to your development machine. Fire up Visual Studio 2012 if you haven’t already. You can just click on the debugging toolbar dropdown to and select “Remote Machine” from the available deployment targets. It will launch the debugger available connections within your subnet. Alternatively, you can right click on your Win8 project and modify the Debug settings. Select “Remote Machine” from the target device drop down options and enter your remote machine name. You can click on the Find button and it will launch the debugger available connections too.

RemoteDebug_Surface_06

Screenshot (12)

Screenshot (11)

Screenshot (9)

Step 5: Run your Windows Store application
Visual Studio will use the Remote Debugger to connect to the Surface. Once the connection is made, it will install and run the app on it, as you would experience it in the local machine. The beauty is that you can debug the code remotely just as if you were running the app locally. Which is incredibly handy when troubleshooting performance or working with hardware sensors and touch gestures when your dev machine don’t have those capabilities. Notice that after stopping the debugger, the Windows app will remain available on the start menu of the Surface. You can keep running the app directly from the Surface afterwards.

WP_20121127_001

RemoteDebug_Surface_07

You can find more details on the different remote debugging settings and configuration options on MSDN

Hope this helps. Let me know if it works for you, or if you have any issues.

No comments:

Post a Comment