Skip to content

Commit ffb9b96

Browse files
author
Jill Grant
authored
Merge pull request #234632 from zmssp/spring/remote-debugging
Add doc to explain how to add remote debugging role from portal
2 parents d087312 + ed518c9 commit ffb9b96

File tree

3 files changed

+39
-19
lines changed

3 files changed

+39
-19
lines changed

articles/spring-apps/how-to-remote-debugging-app-instance.md

Lines changed: 39 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ms.service: spring-apps
55
ms.topic: how-to
66
author: KarlErickson
77
ms.author: jialuogan
8-
ms.date: 12/01/2022
8+
ms.date: 4/18/2023
99
ms.custom: devx-track-java, event-tier1-build-2022
1010
---
1111

@@ -79,6 +79,44 @@ az spring app get-remote-debugging-config \
7979

8080
---
8181

82+
## Assign an Azure role
83+
84+
To remotely debug an app instance, you must be granted the role `Azure Spring Apps Remote Debugging Role`, which includes the `Microsoft.AppPlatform/Spring/apps/deployments/remotedebugging/action` data action permission.
85+
86+
You can assign an Azure role using the Azure portal or Azure CLI.
87+
88+
### [Azure portal](#tab/azure-portal)
89+
90+
Use the following steps to assign an Azure role using the Azure portal.
91+
92+
1. Open the [Azure portal](https://portal.azure.com).
93+
1. Open your Azure Spring Apps service instance.
94+
1. In the navigation pane, select **Access Control (IAM)**.
95+
1. On the **Access Control (IAM)** page, select **Add**, and then select **Add role assignment**.
96+
97+
:::image type="content" source="media/how-to-remote-debugging-app-instance/add-role-assignment.png" alt-text="Screenshot of the Azure portal showing the Access Control (IAM) page for an Azure Spring Apps instance with the Add role assignment option highlighted." lightbox="media/how-to-remote-debugging-app-instance/add-role-assignment.png":::
98+
99+
1. On the **Add role assignment** page, in the **Name** list, search for and select *Azure Spring Apps Remote Debugging Role*, and then select **Next**.
100+
101+
:::image type="content" source="media/how-to-remote-debugging-app-instance/remote-debugging-role.png" alt-text="Screenshot of the Azure portal showing the Add role assignment page for an Azure Spring Apps instance with the Azure Spring Apps Remote Debugging Role name highlighted." lightbox="media/how-to-remote-debugging-app-instance/remote-debugging-role.png":::
102+
103+
1. Select **Members**, and then search for and select your username.
104+
105+
1. Select **Review + assign**.
106+
107+
### [Azure CLI](#tab/azure-cli)
108+
109+
Use the following command to obtain the Azure Spring Apps Remote Debugging Role.
110+
111+
```azurecli
112+
az role assignment create \
113+
--role "Azure Spring Apps Remote Debugging Role" \
114+
--scope "<service-instance-resource-id>" \
115+
--assignee "<your-identity>"
116+
```
117+
118+
---
119+
82120
## Debug an app instance remotely
83121

84122
You can debug an app instance remotely using the Azure Toolkit for IntelliJ or the Azure Spring Apps for VS Code extension.
@@ -105,15 +143,6 @@ Use the following steps to enable or disable remote debugging:
105143

106144
Use the following steps to attach debugger.
107145

108-
1. Use the following Azure CLI command to obtain the **Azure Spring Apps Remote Debugging Role** role, which includes the `Microsoft.AppPlatform/Spring/apps/deployments/remotedebugging/action` data action permission.
109-
110-
```azurecli
111-
az role assignment create \
112-
--role "Azure Spring Apps Remote Debugging Role" \
113-
--scope "<service-instance-resource-id>" \
114-
--assignee "<your-identity>"
115-
```
116-
117146
1. Select an app instance, and then select **Attach Debugger**. IntelliJ connects to the app instance and starts remote debugging.
118147

119148
:::image type="content" source="media/how-to-remote-debugging-app-instance/intellij-remote-debugging-instance.png" alt-text="Screenshot showing the Attach Debugger option." lightbox="media/how-to-remote-debugging-app-instance/intellij-remote-debugging-instance.png":::
@@ -160,15 +189,6 @@ Use the following steps to enable or disable remote debugging:
160189

161190
Use the following steps to attach debugger.
162191

163-
1. Use the following Azure CLI command to obtain the **Azure Spring Apps Remote Debugging Role** role, which includes the `Microsoft.AppPlatform/Spring/apps/deployments/remotedebugging/action` data action permission.
164-
165-
```azurecli
166-
az role assignment create \
167-
--role "Azure Spring Apps Remote Debugging Role" \
168-
--scope "<service-instance-resource-id>" \
169-
--assignee "<your-identity>"
170-
```
171-
172192
1. Select an app instance, and then select **Attach Debugger**. VS Code connects to the app instance and starts remote debugging.
173193

174194
:::image type="content" source="media/how-to-remote-debugging-app-instance/visual-studio-code-remote-debugging-instance.png" alt-text="Screenshot showing the Attach Debugger option." lightbox="media/how-to-remote-debugging-app-instance/visual-studio-code-remote-debugging-instance.png":::
192 KB
Loading
69.8 KB
Loading

0 commit comments

Comments
 (0)