Cannot Enable Debugging on VM

I Created a new VM, configured it for IIS, Installed Web Deploy.  Deployed a web site...everything works.

When I Click on Enable Debugging in the Server Tools Azure>VM node, I get the following error:

"cannot enable the remote debugging extension on this VM because either it has no remote desktop certificate or the machine is not ready"

I have created a cert and installed it on the cloud service, management Service, and added to the plug in collection.

The RDP Thumprint field on the VM Dashboard is blank

What am I missing?

April 6th, 2014 4:49pm

Hi John,

Did you mean VM is azure cloud service instance? I guess you could try two methods:

1. If you used cloud service, Please make sure you instance installed the certificate and make it trust. You could copy the certificate into VM instance and installed it .if you have more instances, you repeated the above operation.

2.You could enable remote debug feature and  config the certificate in this project on VS. Then you re-deployed the project again.

Please try it.

Regards,

Will

Free Windows Admin Tool Kit Click here and download it now
April 7th, 2014 7:01am

"cannot enable the remote debugging extension on this VM because either it has no remote desktop certificate or the machine is not ready"

I'm having a similar issue. I did have Remote Debugging Tools installed on the VM, but I uninstalled and restarted and face the same error.

Any ideas?

April 11th, 2014 9:45pm

It's a known issue that once you restarted the virtual machine, the RDP certificate thumbprint disappeared. The RDP certificate was still in the virtual machine so that you could still remote desktop. However, you wouldn't be able to enable remote debug extension from Visual Studio. Sorry about the inconvenience. We will roll out the fix very soon.

There is a workaround that you can use Azure Powershell cmdlet (installation from http://go.microsoft.com/?linkid=9811175&clcid=0x409) to enable remote debug extension manually. Here are the steps.

1 ) Remote desktop to the machine.

2 ) Find the RDP certificate from LocalMachine\Remote Desktop" certificate store and keep the thumbprint.

3 ) Manually create another self-signed certificate and install it on the machine with Visual Studio. You can follow http://msdn.microsoft.com/en-us/library/windowsazure/gg432987.aspx .
Keep the thumbprint.

4 ) Run the following sample powershell script (for highlight, ServerThumbprint is RDP thumbprint, ClientThumbprint is the new created.)

Add-AzureAccount

Select-AzureSubscription "Sample Azure Subscription"

$vm = Get-AzureVM -ServiceName "samplecloudservice" -Name "samplevirtualmachine"

$endpoints = @(

    ,@{Name="RDConnVS2013"; PublicPort=30400; PrivatePort=30398}

    ,@{Name="RDFwdrVS2013"; PublicPort=31400; PrivatePort=31398}

)

foreach($endpoint in $endpoints)

{

    Add-AzureEndpoint -VM $vm -Name $endpoint.Name -Protocol tcp -PublicPort $endpoint.PublicPort -LocalPort $endpoint.PrivatePort

}

$referenceName = "Microsoft.VisualStudio.WindowsAzure.RemoteDebug.RemoteDebugVS2013"

$publisher = "Microsoft.VisualStudio.WindowsAzure.RemoteDebug"

$extensionName = "RemoteDebugVS2013"

$version = "1.*"

$publicConfiguration = "<PublicConfig><Connector.Enabled>true</Connector.Enabled><ClientThumbprint>56D7D1B25B472268E332F7FC0C87286458BFB6B2</ClientThumbprint><ServerThumbprint>E7DCB00CB916C468CC3228261D6E4EE45C8ED3C6</ServerThumbprint><ConnectorPort>30398</ConnectorPort><ForwarderPort>31398</ForwarderPort></PublicConfig>"

$vm | Set-AzureVMExtension `

        -ReferenceName $referenceName `

        -Publisher $publisher `

        -ExtensionName $extensionName `

        -Version $version `

        -PublicConfiguration $publicConfiguration

foreach($extension in $vm.VM.ResourceExtensionReferences)

{  

    if(($extension.ReferenceName -eq $referenceName) `

        -and ($extension.Publisher -eq $publisher) `

        -and ($extension.Name -eq $extensionName) `

        -and ($extension.Version -eq $version))

    {

        $extension.ResourceExtensionParameterValues[0].Key = 'config.txt'

        break

    }

}

$vm | Update-AzureVM

 
Free Windows Admin Tool Kit Click here and download it now
April 23rd, 2014 9:54pm

I was successful using this set of instructions an an Azure VM three weeks ago, I am now trying to enable remote debug on another similar Azure VM in the development group.  I had to change the Add-AzureEndpoint to Set-AzureEndpoint to eliminate an error condition that  the script was generating but am still receiving the following error when executing this set of scripts on the VM:

Set-AzureVMExtension : The term 'Set-AzureVMExtension' is not recognized as the name of a cmdlet, function, script file, or operable program. 
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:20 char:7
+ $vm = Set-AzureVMExtension `
+       ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Set-AzureVMExtension:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException


  • Edited by Jim Hewitt Saturday, July 26, 2014 2:05 PM
July 26th, 2014 2:00pm

Has this been fixed yet? I am still experiencing the same issue even with the latest VS update.
Free Windows Admin Tool Kit Click here and download it now
August 19th, 2014 4:33pm

Is this still not fixed? Would appreciate this being fixed so you wouldn't need to be a senior system admin to set it up.
December 19th, 2014 11:35am

I'm seeing this problem with a recently created VM (so if the Azure team did "roll out the fix very soon" after the answer was posted over a year ago, it doesn't seem to be helping in my scenario).

I've gone through the steps described in the answer to enable the agent manually. I can see the endpoints in the Azure portal, and the portal also reports that the extension ("RemoteDebugVS2013" published by "Microsoft.VisualStudio.WindowsAzure.RemoteDebug" version 1.0.0.2) is "Ready", and the detailed status is:

[
  {
    "name": null,
    "status": "Ready",
    "message": "Plugin enabled (name: Microsoft.VisualStudio.WindowsAzure.RemoteDebug.RemoteDebugVS2013, version: 1.0.0.2).",
    "code": null,
    "operation": null
  }
]

But Visual studio does not show the "Attach Debugger" menu option for the VM. It continues to offer the "Enabled Debugging" entry, implying that it thinks the agent it not installed. And clicking on that continues to produce the same "cannot enable the remote debugging extension on this VM because either it has no remote desktop certificate or the machine is not ready" error.

How does Visual Studio (2013, Azure SDK 2.6) determine whether it thinks the debug agent is available? I'm wondering why it thinks the agent's not there when the Azure portal thinks it is - they must be using different mechanisms to report this.

Free Windows Admin Tool Kit Click here and download it now
July 14th, 2015 2:12am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics