Skip to content

Commit 080f9e2

Browse files
author
pensh
committed
Add doc to explain how to add remote debugging role from portal
1 parent f42a20c commit 080f9e2

File tree

3 files changed

+39
-18
lines changed

3 files changed

+39
-18
lines changed

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

Lines changed: 39 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,45 @@ az spring app get-remote-debugging-config \
7979

8080
---
8181

82+
## Assign an Azure role
83+
84+
Before connecting to 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 existing Azure Spring Apps service instance.
94+
1. Select **Access Control (IAM)** from the left menu.
95+
1. Select **Add** in the command bar, 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 Access Control(IAM) page showing the Add role assignment command." lightbox="media/how-to-remote-debugging-app-instance/add-role-assignment.png":::
98+
99+
1. Search for **Azure Spring Apps Connect Role** in the list, 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 Add role assignment page showing the Azure Spring Apps remote debugging Role." lightbox="media/how-to-remote-debugging-app-instance/remote-debugging-role.png":::
102+
103+
1. Select **Select members**, and then search for your username.
104+
105+
1. Select **Review + assign**.
106+
107+
### [Azure CLI](#tab/azure-cli)
108+
109+
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.
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+
120+
82121
## Debug an app instance remotely
83122

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

106145
Use the following steps to attach debugger.
107146

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-
117147
1. Select an app instance, and then select **Attach Debugger**. IntelliJ connects to the app instance and starts remote debugging.
118148

119149
:::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 +190,6 @@ Use the following steps to enable or disable remote debugging:
160190

161191
Use the following steps to attach debugger.
162192

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-
172193
1. Select an app instance, and then select **Attach Debugger**. VS Code connects to the app instance and starts remote debugging.
173194

174195
:::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":::
225 KB
Loading
85.5 KB
Loading

0 commit comments

Comments
 (0)