CHAPTER 2
All of the code in this book works for Windows 8 PCs as well as WinRT devices. If you are authoring software for a WinRT tablet and have a real device, it is very beneficial to use it for debugging and testing your application instead of an emulator (which is usually the default). Most of the code in C++ and DirectX works fine on a Windows 8 PC, as well as a WinRT device (compiled for the ARM target). The emulators are good but can never match the exact characteristics of a real device.
Install the remote tools for Visual Studio 2012 onto the device. This is available from the Microsoft website (available from http://www.microsoft.com/visualstudio/eng/downloads#d-additional-software). It is a service that connects with the Visual Studio development machine to run and debug the app on the device. All the regular debugging mechanisms are available from Visual Studio such as break points, examining the ARM registers, and Memory windows. You need to know the name of the device in order to deploy an application onto it. You also need to have the device run the Remove Debugging Monitor that comes with the previously mentioned installation. Each build configuration (Release x86, Debug x86, Release ARM, etc.) you want the device to run must have the device's name in its project settings.
Change the Application to ARM
If the WinRT device that you are deploying to is ARM based, such as a Microsoft Surface, you can change the configuration for the project from the main menu by selecting ARM.

Configurations
Change debugging to Remote Machine
If it is not set already, you should change the debugging to Remote Machine.

Machine Name
Specify the Name of the Remote Machine
Open the Project > [Name] Properties page from the main menu of Visual Studio or right-click on your project's name in the Solution Explorer and click Properties on the context menu. This will open the properties page for the project. Click Debugging on the left panel and type the name of your remote machine into the space labeled Machine Name.

Remote Machine
Run the Remote Debugger
Run the remote debugging service on the device and you should be able to start debugging from Visual Studio 2012 as usual (press F5 or click the start debugging button). The first thing you will see on the device (Visual Studio Remote debugger's window) says it is connected to the development computer with a message like the following:
3/01/2013 2:48:40 PM [MachineName]\[ComputerName] connected
Shortly after this you will see a message in the output window of Visual Studio saying it is uploading the program to the device. This takes some time, but once the upload is complete the application should run.
Here are some ideas if you are unable to debug the application from the device, or it does not run as expected:
Finally, if the application is not executing as expected but is running, ensure the code you have used is completely portable to WinRT. Be aware that these devices do not have a dedicated graphics card. They rely on a scaled down, portable, and energy efficient CPU/GPU combination. The version of DirectX 11 which runs on these devices is also scaled down. It does not contain the full capabilities of the DirectX 11 standard. The operating system itself (Windows RT) is a scaled down version of the full Windows 8, and many features are missing (free access to the file structure, for instance).