Debugging a Windows 8 Store App on a Surface RT

While developing your Windows 8 Store App, you have two choices when it comes to debugging. The first is to debug on the machine you are developing with and the second is to set up remote debugging on another device and debug from your development machine whilst running the app on the second device. Here I will explain how to set up a Surface RT machine to allow debugging from a laptop when both are connected to a home wi-fi connection.

Here is the set up I used for this demo; simple stuff. Both devices are only connected to my home w-fi.

Surface and laptop set up

Firstly you need to install the Remote Tools for Visual Studio 2013, and choose just the ARM component.

Download choice from MSDN

Transfer this file over to your Surface device and run it on there. Normally installs are blocked on an RT device, however this is allowed to install.

This gives you an app to run under Visual Studio 2013, you will have to go to the All Apps screen to get access to it. You can then pin it to your Start Screen if you wish.

Program links on all apps screen

Running this app takes you to the desktop view and waits for incoming connections.

Note the name of the device:- here its GP_SURFACE

Remote debugging listening for connections

You can go to Tools >> Options and select the No Authentication radio button. This is not recommended, but it will do for this example.

Remote debugger connection properties

Go to Visual Studio and choose Remote Device from the debugging drop down menu.

Visual Studio debugger choice

You may get an error with deployment, this is because authentication is set by default.

Deployment error

To fix this, right click the project file and go to properties.

Visual Studio properties option

This is where you can configure the authentication and the remote machine name. When doing this the first time Visual Studio will prompt you for the machine name, but if you need to change it in the future it is here under Properties.

Visual Studio debugging options

Now when you run it, you will see on the Surface debugger that a connection has been made just prior to the app being deployed and run. You can now debug into your app.