Does Cloud Service (Extended Support) support Remote Debugging?

ueshiman 16 Reputation points
2022-04-09T22:05:42.767+00:00

Does Cloud Service (Extended Support) support Remote Debugging?

Azure Cloud Services
Azure Cloud Services
An Azure platform as a service offer that is used to deploy web and cloud applications.
665 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Ravi Kanth Koppala 3,231 Reputation points Microsoft Employee
    2022-04-10T02:21:46.433+00:00

    Thank you, @ueshiman , for reaching out to the Microsoft Q&A platform. Happy to answer your question.

    Cloud Services (extended support) has the primary benefit of providing regional resiliency along with feature parity with Azure Cloud Services deployed using Azure Service Manager. It also offers some Azure Resource Manager capabilities such as role-based access control (RBAC), tags, policy, and supports deployment templates, private link. So, the answer to your question; Yes, it supports remote debugging.

    ----------

    Please "Accept as Answer" and Upvote if any of the above helped so that, it can help others in the community looking for remediation for similar issues.


  2. Glenn Rockland 6 Reputation points
    2024-05-28T01:19:40.7666667+00:00

    Unfortunately previous convenient methods that were implemented in Visual Studio 2019 on the basis of Server Explorer (i.e. Azure resoutces and services could be displayed and were accessible permitting Attach To Process and WaWorkerHost.exe that allowed remote debugging) is no longer available in VS 2019 or 2022. Alternate methods suggested in the existing documentation are only partially complete.

    I had to use the following process to enable remote debugging of a cloud service (extended) from Visual Studio 2022:

    1. Publish using Publish (extended) with the enable remote desktop checked.
    2. Enter a login and password combination in the dialog that should appear for later reference.
    3. On a different machine I went to the Azure portal and selected the worker role in Roles and Instances of the cloud service and hit the Connect button. Then click the downloaded file and a remote desktop appears.
    4. In the remote desktop go to Settings->System->Remote Desktop and I tried to enable it and a Confirm screen appeared and after OK the setting remained unenabled(?) but it didn't seem to matter.
    5. In the remote desktop I installed the remote tools for Visual Studio 2022.
    6. I went to where I installed the remote tools (C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\Remote Debugger\x64) and ran msvscom.exe.
    7. This starts a remote debugger that has options for port and permissions.
    8. I selected the default settings.
    9. I returned to the Publish machine and under Debug selected Attach To Process. With Connected Type to Default and Connection Target to the ip of the service with the port 4024 e.g. 13.54.234.35:4024 (matching the entry in the .csdef file

    <Endpoints>

     <InputEndpoint name="RemoteDebug" protocol="tcp" port="4024"localPort="4024"

    1. A dialog pops up asking for the login and password that you entered from the Publish remote desktop option.
    2. Scroll down to WaWorkerHost.exe and select the Attach button.
    3. The Output window of VS then displays Debug messages and allows setting breakpoints. Voila!

    The clearly is a difference between the process for a cloud service and a Web App.

    This YouTube video was helpful:

    https://www.youtube.com/watch?v=NMsZAvzwLoE

    Some of the documentation might be relevant:

    https://video2.skills-academy.com/en-us/visualstudio/debugger/remote-debugging-csharp?view=vs-2019

    Entries in the .cscfg might be problematic and also you may need to set IAM permissions for cloud service access. The documentation indicates other ways to establish a remote debugging scenario but this was the only one that worked for me.

    0 comments No comments