So you just finished coding your newest awesome Windows Store app. Your unit tests (you have them, right?) run green, the app runs smooth inside the emulator – basically everything looks fine. Only, you haven’t once ran and or tested the app on an actual WinRT device like the Surface.
Since we obviously cannot install Visual Studio on Surface / WinRT (no installation of desktop apps, remember?) this leaves only one option:
That again raises the question of: “If I can’t install desktop software on Windows RT devices, how am I supposed to install the remote debugging tools, then?”
Well, it turns out that you actually can install certain desktop software applications on Windows RT and among these applications are – you already guessed it – the remote debugging tools.
Download and Install
Here’s the download link for Remote Tools for Visual Studio 2012.
It might feel unusual (even weird) installing desktop software on a WinRT device, but it just works as usual.
Starting the Remote Tools
To start debugging we have to run the remote debugger on the device. Let’s switch to the start screen and type “remote”. The Remote Debugger application should show up now.
When starting the application we automatically switch to the Windows desktop and should see this status message (or similar, depending on your device’s host name).
Msvsmon started a new server named ‘SURFACE':4016’. Waiting for new connections.
Switching back to our development machine and to Visual Studio we can now choose Remote Machine from the Debug Options in the toolbar.
If your Surface (or other WinRT device) is in the same subnet, which it usually is, it will automatically be discovered in the upcoming dialog. If not, a hostname or IP address can still be specified here.
When debugging for the first time you will also get prompted for the installation of a developer license on the WinRT device. Just accept the dialog and you can continue. (This dialog will show up again after a couple of months, when the license has expired).
Debugging on your Surface / WinRT device – it’s that easy.