0
votes

I'm having trouble getting remote debugging working in an Azure Cloud Service. I've read a lot of conflicting (possibly out of date) information about how to configure this, and nothing seems to be helping.

When I attempt to "Attach Debugger" from Server Explorer I get this error:

enter image description here

Additionally when I RDP into the machine I cannot find a running msvsmon.exe, or the service registration. I cannot find anything relevant in Windows Event Log of either my machine or the server. So far I've added the following to my .csdef:

<Endpoints>
  <InstanceInputEndpoint name="Microsoft.WindowsAzure.Plugins.RemoteDebugger.Connector" localPort="30398" protocol="tcp">
    <AllocatePublicPortFrom>
      <FixedPortRange min="30400" max="30424" />
    </AllocatePublicPortFrom>
  </InstanceInputEndpoint>
  <InstanceInputEndpoint name="Microsoft.WindowsAzure.Plugins.RemoteDebugger.Forwarder" localPort="31398" protocol="tcp">
    <AllocatePublicPortFrom>
      <FixedPortRange min="31400" max="31424" />
    </AllocatePublicPortFrom>
  </InstanceInputEndpoint>      
</Endpoints>
<Certificates>
  <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteDebugger.TransportValidation" storeLocation="LocalMachine" storeName="My" />
</Certificates>
<ConfigurationSettings>
  <Setting name="Microsoft.WindowsAzure.Plugins.RemoteDebugger.Connector.Enabled" />
  <Setting name="Microsoft.WindowsAzure.Plugins.RemoteDebugger.CertificateThumbprint" />
</ConfigurationSettings>

As well as the following to my .cscfg:

<ConfigurationSettings>
  <Setting name="Microsoft.WindowsAzure.Plugins.RemoteDebugger.Connector.Enabled" value="True" />
  <Setting name="Microsoft.WindowsAzure.Plugins.RemoteDebugger.CertificateThumbprint" value="..."/>
</ConfigurationSettings>
<Certificates>
      <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteDebugger.TransportValidation" thumbprint="..." thumbprintAlgorithm="sha1" />
</Certificates>

I have Visual Studio 2013 Update 4 with Azure SDK 2.6. Any ideas would be appreciated!

1

1 Answers

1
votes

Since this looks like a PaaS deployment. Have you tried a simple re-deploy to see if that resolves it?

I'm also hoping the only thing you did to turn remote debugging on was check "Enable Remote Debugger for all roles" in the publish dialog when deploying from visual studio. Please let me know if that's not the case and you did something custom / or deployed from outside visual studio.

Besides, Can you please RDP in the remote machine and look at a couple of things:

  • Do you see the "Microsoft.VisualStudio.WindowsAzure.RemoteDebugger.Connector.exe" process running?
  • Do you see the directory "E/F:\plugins\RemoteDebuggerConnector"
  • Do you see any errors in "E/F:\plugins\RemoteDebuggerConnector\Connector\AzureDebug.Connector.log"?