×

First time here?

You are looking at the most recent posts. You may also want to check out older archives. Please leave a comment, ask a question and consider subscribing to the latest posts via RSS or email. Thank you for visiting!

So you got that shiny new Surface device today?  I’m sure you spent the first few hours just opening it up, setting your personal experiences to your desire, re-installing and discovering new apps.

But you are a developer and now you want to see how your app looks on this great device…Here are some tips to get you quickly started.

Setting up the tools

One thing to keep in mind is that Surface is NOT a full ‘desktop’ machine and runs on an ARM processor.  This means to that you cannot install Visual Studio directly on the Surface RT device.  You will need to still ensure that you have a full development environment set up.  But the first thing you will need is to get the remote developer tools for Visual Studio *for your target remote device* architecture.  For Surface RT, this is the ARM tools.

You can get them here: Microsoft Visual Studio Downloads.  Scroll down a bit and look in the “Additional Software” section.  Grab the Remote Tools for Visual Studio 2012 section. 

Remote tools for VS download

You can do this either from the desktop browser on the Surface or from your own desktop and download the remote tools for ARM to a USB key.

On your device, install the remote tools for ARM.  No other Visual Studio installation is required here.  Just run the installer.  When completed you should have a tile on your screen for the tools:

Remote Debugger tile

Now you can get started with your remote debug session!

Configuring the Remote Debugger

After install go ahead and launch the Remote Debugger on your device.  You’ll be presented with (maybe after some firewall questions you need to authorize) the remote debugger now running and in default mode:

Remote Debugger launched

By default, it is set up secure.  This means that in order to attach a remote session you’d need to ensure permissions are correct, etc.  Now since your ARM device isn’t likely on the same domain/workgroup as your developer machine this may be tricky.  Personally, I turn off the authentication options to make my developer experience smoother.  Now of course, you shouldn’t leave your device in this state, but you can close the remote debugger when complete.  Here is the config that I use on my remote debugger:

Remote Debugger config

This allows me to just launch the app on the remote machine without having to use any special authentication tricks since the machine isn’t on my domain, etc.  My remote environment is now set up and ready for me to launch an app and start debugging!

Launching an App on the remote debugger

Now that your remote device is configured and listening, you want to start your app and debug remotely.  Once you have your app in Visual Studio you’ll want to change your launch target to “Remote Device” in the IDE.  This is in the toolbar or in the project properties.  For a C# application it looks like this:

Select Remote Machine target

Once you launch that you’ll be able to select your device.  Now if you are on your home network, with no domains and all on the same subnet, you may just be able to discover your device in the remote debugger connections window.  However you can also just specify the machine name.  Be sure to match the authentication method in this window with what you chose when you set up the remote debugger…in my case “none.”

Remote Debugger connections window

Now that the configuration is there (and selected), when I run (F5) the application it will attempt to deploy it on the remote device.  When you run you’ll notice the remote debugger will show the connections:

Remote debugger connected window

And in your developer workstation you’ll be able to set breakpoints, investigate watch parameters, etc.  All the same stuff you normally do is still available to you.

Summary

Now that you have a Surface (or other Windows RT device) running on an ARM processor, this remote debugging toolset/workflow will be important to you.  The great thing is that once it is set up and you understand the flow, it is very simple and seamless to use.  This presents a great opportunity for you to debug and profile your apps on Windows RT to see any areas that you might be able to optimize for the target device.  And all you need is Visual Studio Express for Windows 8 (free) and the Remote Debugger tools for Visual Studio 2012 (free)

Hope this helps!


This work is licensed under a Creative Commons Attribution By license.


10/26/2012 10:33 AM | # re: Remote Debugging your Windows Store app on your Surface
So useful, thanks!
10/26/2012 4:40 PM | # re: Remote Debugging your Windows Store app on your Surface
After you setup the connection and you need to change some connection settings, how do you invoke the "Remote Debugger Connections" dialog again?

TIA

cheers---
10/26/2012 5:16 PM | # re: Remote Debugging your Windows Store app on your Surface
@Monte You need to go into the project properties. For a C# or VB project it'd be under Start Options in the Debug tab in the project properties. For C++ or JavaScript, it's in the project's property sheet go to Configuration Properties -> Debugging then switch the "Debugger to launch" drop down to Remote Machine (if it's not already set to that) and change the settings.
10/26/2012 7:46 PM | # re: Remote Debugging your Windows Store app on your Surface
Thank you for this tip -- are there any troubleshooting tips that you would have? I followed the instructions as far as I can tell -- but the deploy to the surface fails every time with a non-specific error: "VS 2012 remote debugger failed attempt to connect" . all the debugging that I have found online does not reference ARM's.
10/27/2012 6:54 AM | # re: Remote Debugging your Windows Store app on your Surface
Perfect article. Exactly what I needed to get started pushing my apps onto my Surface for testing.
10/27/2012 6:58 PM | # re: Remote Debugging your Windows Store app on your Surface
Hi Tim,

I am not able to get items to display on Remote Debugger Connections dialog.
I set the Surface's network discovery to on and have tried using both machine name with port number as well as ip address.

I am using VS2012 RC.
Unlike your screenshot I do not have a Manual Configuration section.

What could I be doing wrong?
10/27/2012 8:03 PM | # re: Remote Debugging your Windows Store app on your Surface
Instead of using "No Authentication," I recommend using the default and just use your MS account to authenticate. Works great, at least when you're logged into both your development machine and your test machine using the same MS account.
10/28/2012 5:20 PM | # re: Remote Debugging your Windows Store app on your Surface
One important thing to note is that if you're using delay signed bits you'll need to disable strong name verification for those bits on the remote machine as well.
Gravatar
10/29/2012 1:15 PM | # re: Remote Debugging your Windows Store app on your Surface
Thanks again Tim... without your examples this stuff would be much more painful than it should be.
10/30/2012 6:37 PM | # re: Remote Debugging your Windows Store app on your Surface
Dude, great tutorial. Was very simple to follow and it worked for me first time. Thanks.
10/31/2012 6:15 PM | # re: Remote Debugging your Windows Store app on your Surface
@Steve

What is your network setup for this? Is the Surface on wifi and the VS machine wired? Did you specify the machine using the IP or did you use the remote discovery dialog? If there is any more to the error message, please send us the full message. Are both the remote debugger and VS configured for no authentication mode? Are there any messages that pops up in the remote debugger window on the Surface when you try to launch?

BTW, we definitely recommend using windows authentication when possible since no authentication mode is not secure.
11/1/2012 6:24 PM | # re: Remote Debugging your Windows Store app on your Surface
@Marc -- Thanks for your offer of assistance I will answer all of your questions to the best of my ability.

connection: Surface is on Wifi -- VS wired.

I used the name given in the visual studio debugging monitor on the surface to get connect. STEVE-SURFACE:4016. (I have tried it multiple different ways since then though... including uninstalling and re-installing the remote debugger)

on clicking the '> Remote Machine' button immediate popup says :There were deployment errors. Continue?

on no: bottom status simply says 'Deploy Failed'

on Selecting Yes: The project 'project1' needs to be deployed before it can be started. Verify the project is selected to be deployed in the solution configuration manager, or deploy it explicitly by clicking one of the deploy commands in the Build Menu'

on selecting Build>Deploy from the menu, bottom status simply says Deploy Failed.

on the remote debugger monitor: ' Failed attempt to connect from Steve-PC'

I have tried to connect both with and without authentication mode turned on.
11/2/2012 3:06 AM | # re: Remote Debugging your Windows Store app on your Surface
Hi Marc,

I am also having the same issue as @Steve, So please guide us to enable debugging on Surface.

Thanks, Praveen
11/2/2012 11:55 PM | # re: Remote Debugging your Windows Store app on your Surface
Good news. I worked with Steve through email and he was able to figure out the problem he was running into. He had an RTM version of the remote tools but was still using an RC version of VS. Those two versions are not compatible and once he updated his VS version, he was able to successfully remote debug.

Praveen, can you let us know if you have the same configuration?
11/4/2012 1:54 AM | # re: Remote Debugging your Windows Store app on your Surface
Hi,

I'm not able to connect using the machine-name.
I'm able to connect using the IP address. That too after enabling the file sharing option by starting "server" in services.msc.

Let me know if I have to enable anything to use the machine name instead.

My dev PC is on WiFi.
My Windows RT device is on WiFi
Visual Studio is running in VM on the dev PC.

All tools were installed yesterday.
11/7/2012 3:52 PM | # re: Remote Debugging your Windows Store app on your Surface
Thank you! Worked like a charm.
11/10/2012 12:00 PM | # Tim, please inform the folks at Microsoft Generation App how to do this
Tim, that's at least three times that you've pulled my fat out of the fire!

You do an excellent job of documenting issues that are otherwise very poorly (or not at all) documented. This is no exception. I tried to get help from the folks at Generation App, but they don't have your magic solution. You may want to distribute your solution to this internally at Microsoft, as most of the documentation that I found about testing on RT devices points the developer to a requirement for a sideloading license (to the tune of $3000 -- a pack of 100 licenses, at a cost of $30 per license).

Just wanted to let you know how much I appreciate the work you are doing helping developers to understand the paths to successful Windows 8 Metro development...yes, I used the forbidden word...there! Metro..I did it again...and yes, I do feel better for having said it :)

thanks again...rick
Gravatar
11/15/2012 8:59 PM | # re: Remote Debugging your Windows Store app on your Surface
I have a new Surface and wanted to run/test/debug my new Windows Store app on it. I followed the procedures outlined and can't quite get the app to come up on the surface. The splash screen appears and stalls.

On the dev machine, getting an initialization error within the app.xaml.cs this.initializecomponent(). The error implies there may not be a correct path for assembly. I have adjusted the projects target location to ARM.

I've also noticed the ARM remote tools install, under options the default location was blank. I had to create the Microsoft Visual Studio 11 directory and then install the rTools to that location.

I have a USB to USB wired connection from dev machine to Surface.
11/16/2012 6:30 AM | # re: Remote Debugging your Windows Store app on your Surface
Social Housing Capital Expenditure Plan for 2010 Westmoreland City adds 722 million leke investment in infrastructure, 237 million leke investment in public services, 19.4 million leke investment in sport and culture, 20 million leke investment in education, 21 million leke investment in the field of social services. This draft budget is a reflection of a shared decision-making with the community, faithful expression of the needs and expectations of our fellow citizens. "Dako Mayor stated that this budget should be adopted as soon as possible in order to start without losing time from work and not allowed to shift resulting in investment terms for the realization of their full consequences rush my essay.
11/17/2012 7:11 PM | # re: Remote Debugging your Windows Store app on your Surface
Tim - I have tried everything. I have a BUILD Surface and a BUILD Samsung tablet. Both are running full, RTM versions of everything. Logged in or no authentication, I just can't get the Surface visible to my dev environment. I've tried starting the Server service and all the other things listed here. I'm at a loss. They are both on the same subnet, I'm admin on both. Everything is as you suggested, just no dice.
11/18/2012 9:13 AM | # re: Remote Debugging your Windows Store app on your Surface
Awesome! Thanks, Tim.

@Scott, I'd try disabling your firewall as a troubleshooting step. Also, check if you can see your SurfaceRT from the network node in Windows Explorer on your dev PC. If not, you may need to enable "Network Discovery" in "Control Panel > Network and Internet > Network and Sharing Center > Advanced sharing settings".
11/18/2012 10:28 PM | # re: Remote Debugging your Windows Store app on your Surface
Hi tim ,
remote tools for surface tablet not getting installed on my surface..What might be the proble??
Thank you
11/20/2012 10:29 AM | # re: Remote Debugging your Windows Store app on your Surface
Out of interest, is it possible to deploy and remote debug from a PC to Surface using the USB connection on the Surface? There are situations where WiFi just isn't available.
11/24/2012 9:56 AM | # re: Remote Debugging your Windows Store app on your Surface
Hi Friend,
I have question, when I download Microsoft Visual Studio and i tray to instal, my windows doesn't work Instead there was an error on my windows, why?, can you tell me about this problem. Thank you before.
11/29/2012 9:55 AM | # re: Remote Debugging your Windows Store app on your Surface
Is it possible to just sideload a package if the Surface is developer unlocked? I've got some code I want to test, but I don't want to hand out the source code.

Can I somehow send a zip to a friend who has a dev unlocked surface, and test it that way somehow? Any pointers on how to do that?
11/29/2012 10:04 AM | # re: Remote Debugging your Windows Store app on your Surface
Never mind Tim, Mike Taulty sent me this link:
blogs.msdn.com/.../10365947.aspx
Gravatar
12/6/2012 11:21 AM | # re: Remote Debugging your Windows Store app on your Surface
Thanks a lot!!! This was very helpfull. I love you "internet content providers". You make life easier
12/13/2012 7:00 AM | # re: Remote Debugging your Windows Store app on your Surface
I can't get the "Remote Tools for Visual Studio 2012 Update 1" to install on my Surface RT slate. The install process hangs indefinitely on the Setup Progress dialog. The progress bar shows no progress whatsoever. Task Manager indicates very little CPU usages (< 2%) and no Disk or Network activity for this process. Windows update indicates that there are no update to install. ...it's always something!
1/3/2013 8:19 AM | # re: Remote Debugging your Windows Store app on your Surface
Calvin,

did you check your Desktop? It may expect a click on a sub menu that is minimized. It happens to me.

I just installed on Surface 32g without any problems.

Good luck.
1/15/2013 12:18 PM | # re: Remote Debugging your Windows Store app on your Surface
Excellent it worked as expected.
At first I got the error on the remote debugger monitor: ' Failed attempt to connect from XXXPC'.
But then I realized that I missed to check "Allow any user to debug" under authentication mode when No authentication is selected, and then everything worked just perfect.
1/18/2013 4:03 AM | # re: Remote Debugging your Windows Store app on your Surface
Excellent as usual, Tim!

I almost forgot about your blog, but then I googled for some manuals on "how-to-anything" with my new surface device and you popped up again in my search results.

Glad to be back - keep up the good work!
1/28/2013 9:51 AM | # re: Remote Debugging your Windows Store app on your Surface
Worked great. I was able to use my Microsoft Account login credentials (also logged in as same on dev machine). So I didn't need to use an unsecure connection.
3/12/2013 9:36 AM | # re: Remote Debugging your Windows Store app on your Surface - Unable to find remote Surface
I've gone through all of the steps and suggestions for resolving this but I still can't get my Dev PC to see the Surface. From the Surface I can ping the Dev PC but not the other way round (Reply from 192.168.1.73 Destination Host Unreachable). 73 is the Dev PC.

I've turned the Firewall off and because 'ping' fails it seems to be something fundamental but for the life of me I can't see what it can be.

Any help with this would be gratefully received.
3/12/2013 9:56 AM | # re: Remote Debugging your Windows Store app on your Surface
As a post script I've noticed that whatever I do I can't turn the Firewall OFF?
3/25/2013 6:18 AM | # re: Remote Debugging your Windows Store app on your Surface
I've got same problem as Riki. Anyone got a solution for this? Any help would be greatly appreciated.
6/26/2013 3:27 PM | # re: Remote Debugging your Windows Store app on your Surface
I was struggling with this problem the other day. I'm so glad I found this post!
7/1/2013 4:26 PM | # re: Remote Debugging your Windows Store app on your Surface
had my new surface RT up and debugging in less than 5 minutes with your help!... thanks so much, this is going to be great!
7/2/2013 8:59 AM | # re: Remote Debugging your Windows Store app on your Surface
Great article! But unfortunately the remote debugger software will not install on my surface, most likely because it is running the 8.1 preview. Bummer :(
9/17/2013 4:30 PM | # re: Remote Debugging your Windows Store app on your Surface
Tim, I was trying to get the remote debugging working, at the device end, I see that I am connected from my laptop, however I get an error as follows - any ideas?

1>Error : DEP0600 : The following unexpected error occurred during deployment:
1>Root element is missing.
10/23/2013 10:59 PM | # re: Remote Debugging your Windows Store app on your Surface
This post must be in the MSDN.... great job thanks mate..
10/29/2013 9:46 PM | # Hey There
I truly love your site.. Excellent colors & theme. Did you develop this site yourself? Please reply back as I’m planning to create my very own website and want to learn where you got this from or exactly what the theme is called. Thank you!
12/12/2013 11:05 AM | # re: Remote Debugging your Windows Store app on your Surface
These instructions are not clear, and I cannot get these to work with Windows 8.1 RT, form Visual Studio 2012 on Windows 8.1.
I have installed VS2012 SP4 Remote debugging Tools for ARM, on my Nokia Lumia 2520 RT 8.1 Device. Installed as Administrator, and set running. (Version 11.0.61030.0) But this Remote Service still cannot be seen from my VS2012 session. It cannot see the service.
I had some hassle ensuring that ping worked both ways. So had to set the 'Server' service going on my RT device to file share, to enable my RT device to be seen from my development machine. So I can share files, and ping both ways.

But now I am still stuck. My RT Remote debugging Monitor service is simply not seen, even if I switch Authentication On/ off at both ends etc. I don't have a (VS 2012) Remote debugger Configuration Manager App on my RT machine.

Unable to develop on Nokia Tablets. So any help would really be appreciated before I give up !

BTW Wales doing really well in Rugby these days.

]ules
12/18/2013 9:50 PM | # re: Remote Debugging your Windows Store app on your Surface
I can not got the "Remote Tools for Visual Studio 2012 Update 1" to install on my Surface RT slate. The install process hangs indefinitely on the Setup Progress dialog. The progress bar shows no progress whatsoever. Task Manager indicates very little CPU usages (< 2%) and no Disk or Network activity for this process.

 
Please add 8 and 4 and type the answer here:

DISCLAIMER:

The opinions/content expressed on this blog are provided "ASIS" with no warranties and are my own personal opinions/content (unless otherwise noted) and do not represent my employer's view in any way.