Question

I deployed a web role in windows Azure, based on the following tutorial. http://weblogs.asp.net/scottgu/archive/2013/10/22/windows-azure-announcing-release-of-windows-azure-sdk-2-2-with-lots-of-goodies.aspx

but when I try attaching the debugger I get the following message: "there was a failure to launch the remote debugger"

apparently this is a known issue, and the suggested solution from Microsoft is to restart the visual studio and try again, which unfortunately didn't work for me

http://msdn.microsoft.com/en-us/library/windowsazure/dn459835.aspx

Remote debugging may fail to attach to an existing Cloud Service:

After deploying a new Cloud Service the debugger may fail to attach to an existing cloud service with the error message “There was a failure to launch the remote debugger”. To correct this problem, restart Visual Studio and reattach the debugger to the new deployment.

So I thought to ask here in case anybody faced the same issue and found another solution other than restarting the visual studio!

I'm using visual studio 2012, with Azure SDK 2.2

Was it helpful?

Solution 2

I was using Azure SDK 2.2, so as to use "Attach debugger", but unfortunately I needed to use SDK 2.1 as 2.2 needs some references that weren't included in 2.1, so I guess this is the problem.

Thank you all for your help

OTHER TIPS

Make sure that you deployed a Debug build to your web role and that you have checked "Enable Remote Debugging for all roles" on the advanced tab during deployment. Failure to do either of these could lead to the problem your seeing.

I tried all of the solutions above and found that none worked for me. My problem turned out to be stale or inaccessible certificates that the VS debugger uses to connect to the service. I discovered this was the problem by going to event viewer and found:

A fatal error occurred when attempting to access the SSL client credential private key. The error code returned from the cryptographic module is 0x8009030D. The internal error state is 10003.

I had had other problems with permissions on private keys and so I ended up deleting all of the certificates from my personal store (current user) with the "Issued To" equal to "Windows Azure Tools". When I redeployed my service VS created new certificates and uploaded them.

Voilà -- attach remote debugger works again.

I got the same exception trying to remotely debug a VM in Azure, following the guide in Debugging Azure Virtual Machines.

What worked for me was to simply install the remote debugging tools matching my version of Visual Studio (VS2013 Update2).

Further I had to add a new endpoint in the Azure portal. This didn't work initially but eventually using the same public and private port number did the trick. The default port of 4018 worked.

Start the remote debugger program on the client machine in adminstrator mode and remember to set to port number, e.g. to 4018. I chose Windows authentication as well.

From within Visual Studio: Debug menu -> Attach to Process -> [yourVMName].cloudapp.net:4018 or whatever port number you chose. You should now see a list of processes on the virtual machine.

In case its helpful for someone else, I've just spent 3 hours on this! In the end I gave up and using 'Cloud Explorer' (in VS 2013, after installing the Azure SDK) I selected 'Disable Debugging' and noticed it cleared out port rules in the Network Security Group for the VM.

I hadn't seen it set these up (which is where I'd spent hours guessing that these were the issue and trying to figure them out from patchy MS documentation, broken links, etc).

So, I 'enabled debugging' for the VM and saw it set up security rules - something it didn't do the first time!

At a guess this is because I had initially enabled debugging for my VM soon after I installed the Azure SDK into VS. Since then I rebooted the VS server, and that may have enabled something in the SDK.

Anyway - before spending hours figuring out ports, reboot the VS server and then disable/reenable debugging in Cloud Explorer - you should see a status message (in the Azure Activity Log) saying 'Configuring networking security group debugging port' - this is the magic step that it didn't do the first time around.

I think you should try lunching VS in administrator mode, and see if you always have the same problem.

Else I think you should put more details about your problem.

This is what I did to enable debugging on an Azure VM.

At the time of this writing my current setup is as follows

  • Windows Server 2012 R2 IIS 8.5 (Virtual Machine)
  • Visual Studio 2013 Update 4
  • Microsoft Azure SDK Tools 2.5

    1. Update Visual Studio to the latest Azure SDK
    2. go th the server window (server explorer)
    3. Expand the Azure node
    4. Expand the virtual machines node
    5. Right click on the VM you want to debug
    6. Choose "Enable Debugging" Visual Studio will begin to add a debugger extension to your virtual machine
    7. Once complete, Right click on the virtual machine from the virtual explorer and choose attach debugger
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top