Azure: there was a failure to launch the remote debugger

吃可爱长大的小学妹 提交于 2019-12-06 03:55:18

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 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

craigwi

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
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!