Take the 2-minute tour ×

I now have my Windows Azure environment set up so that I can access my Worker Role with Remote Desktop. However, I'm not sure how to proceed at the moment. After much digging I found a web site that was offline but in Google's cache there was mention of attaching to the Worker Role running in the Azure Cloud from the Visual Studio debugger. But I only have Visual Developer (not studio) 2010 and I have searched all over and as far as I can see there is no such option to attach to a remote server. I am able to publish my project to the Azure Cloud without error and I have a "healthy" instance of my Worker Role showing as active and running.

I did connect with RDP through the Azure Management portal. The login worked fine and up came the remote desktop window. I searched through much of what I could find and was unable to find my Worker Role. I must have the wrong impression of RDP, because I had hoped to see the Worker Role's main display form when I logged in, just like I do when I debug it locally in the Cloud Emulator. But instead all I saw was a blank desktop with some base level server inspection and management routines. I even checked the Event Viewer for Application related messages and saw none.

So now I'm stuck wondering if my Worker Role is actually running or not, despite the seemingly positive status messages from the Management Portal, and I still want to attach to my Worker Role for debugging through Visual Developer, if it's possible, but I am unable to figure out how.

Anyone with experience in this area that can give me some solid tips on what to do next, please respond.

UPDATE: I believe my worker role may be running because I opened a command window and did a Netstat and saw it listening on the correct port. However, that may just be my Worker Role shell class that starts the custom EXE I have it launch as a spawned proces. I still haven't confirmed if my custom EXE is running yet.

UPDATE-2: Just ran TaskList from a command window and the custom EXE is listed.

UPDATE-3: Everything is working as I just ran a remote test of the service so that's not a problem. Still want to know how to attach to the Worker Role from Visual Developer 2010 for remote debugging, and if it's possible to see the custom EXE's display form like I do when doing local debugging in the Cloud Emulator.

-- roschler

share|improve this question
Do you have to connect using a debugger? Or is it enough to just see the messages? –  Anže Vodovnik Jul 4 '11 at 23:45
@Anže Vodovnik - I'll take what I can get for now but eventually I'll need to debug I'd think. Also, please see my UPDATE note to my original post. If you don't see it yet it's because I haven't finished typing it. –  Robert Oschler Jul 4 '11 at 23:48
Also, is it possible to see a remote screen presentation of my Worker Role main screen like I see when I debug it locally (does RDP do that)? –  Robert Oschler Jul 4 '11 at 23:52
add comment

5 Answers

up vote 1 down vote accepted

When you say:


this is exactly what you get with an Azure VM. It's a basic OS install, plus the bare minimum of Azure stuff it needs to run and the code you've uploaded. There's no fancy monitoring or health checks available on the machine by default, you're expected to have provided those yourself to have them available without having to RDP into the machine to check on it.

RDP is very good for tracking down certain problems, like checking that a startup task will run, checking which directories items are installed in and just generally being nosey. If you need extra tools to track down a problem, you can just install them while you're connected to the server. For example I have RDPed into a server and installed the Microsoft Debugging Tools, to track down a memory issue.

share|improve this answer
When I debug the custom EXE spawned by my C# Worker Role code locally, in the Cloud Emulator, it comes up with a display form that has a log window and a few other things; the main application screen if you will. This is the exact same behavior as if the EXE was run stand-alone. In other words, it is not a window-less background service or even a Console app. It's a full Windows GUI app. When I log into the RDP console I don't see the app's GUI, even though it is running fine. I am trying to find out why I don't see that GUI element and if there is a way that I can. –  Robert Oschler Jul 5 '11 at 3:23
@knightpfor - Thanks for the Microsoft Debugging Tools link. If you know have a tutorial that shows how do the install with Azure and Visual Developer 2010, please let me know. –  Robert Oschler Jul 5 '11 at 3:27
When you RDP into your VM, you do so as a particular user that you specified in the RDP setup. Your worker role does not run as this user though, it runs as one of the system accounts (I can't remember which one off the top of my head). So like any other RDP session, you don't get to see the desktop of other users. –  knightpfhor Jul 5 '11 at 4:34
That explains it, thanks. –  Robert Oschler Jul 5 '11 at 13:24
add comment

There is a set of articles here which goes in length on how to set up for remote debugging in Azure:




The key takeaway is that you don't need to actually install Visual Studio on Azure, you only need to copy the Remote Debugger bits and then use Azure Connect to add your developer machine to the Virtual Network.

share|improve this answer
Links don't work :( –  Uri May Oct 15 '12 at 14:26
@UriMay: The blogs.u2u.be application sucks, but you can get the helpful content from the overal page view: blogs.u2u.be/peter/?page=2 and blogs.u2u.be/peter/?page=1 –  Vojta Jemelka Apr 16 '13 at 8:03
add comment

You can setup Remote Debugging with Visual Studio 2012

share|improve this answer
A little bit of a summary here would be useful –  Andrew Barber Oct 11 '12 at 18:03
Windows Azure SDK 2.2 release adds support for remote debugging many types of Windows Azure resources. weblogs.asp.net/scottgu/archive/2013/10/22/… –  Trent Swanson Oct 23 '13 at 1:13
add comment

I suppose you could remote into your VM, install Visual Studio there, and debug the process...

I also suppose it might be possible to enable remote debugging (not sure what's involved there, but such a thing exists, and it works over TCP) and debug from a local instance of Visual Studio.

To my knowledge, neither is commonly done.

share|improve this answer
I have done remote debugging, but it was too slow to be practical. I think WinDebug would probably be the way t o go, but the learning curve is very steep. –  Oliver Bock Jul 5 '11 at 2:47
Hello again @smarx. The web page I stumbled across that talked about this mentioned baking in some extra DLLs into the Worker Role. But I got the answer I was looking for. It's not practical. I still would like to be able to see my custom EXE's GUI which, for some reason, is invisible when I log in with RDP. –  Robert Oschler Jul 5 '11 at 3:25
@Oliver Bock - I'll look at WinDebug then, thanks. –  Robert Oschler Jul 5 '11 at 3:25
When you RDP in, you're not in the same GUI context as where your exe is running. (You're not even logged in as the same user.) I'm not even sure your exe has a GUI context for you to look at. –  smarx Jul 5 '11 at 5:15
@smarx - Right. Forgot the simple fact that RDP isn't like an injected monitor program, but a separately logged in user, thanks. –  Robert Oschler Jul 5 '11 at 13:26
add comment

Based on other answers, you would be better off writing a log file to a local storage. You can read the file from RDP if you reallyhace to. Keep in mind, debugging on Azure isn't really simple, and rightly so.

What I was thinking though was, maybe you could run the process using the user's credentials. I can't verify at the moment, but you have a better shot of seeing the ui when you rdp.

share|improve this answer
Interesting idea on the user credentials. Sounds like though my very next project needs to be digging into local storage and then SQL storage. Hopefully Azure SQL isn't too different from MySQL. –  Robert Oschler Jul 5 '11 at 13:27
add comment

Your Answer


