You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Policy debugging uses the built-in (service-level) all-access subscription (display name "Built-in all-access subscription") and enables tracing for the duration of the debugging session.
44
+
45
+
## Create policies using GitHub Copilot
46
46
The Azure API Management extension integrates with GitHub Copilot for Azure to help you create a draft of a policy. With AI assistance, create and edit policies in a user-friendly way.
47
47
48
48
To create a policy:
@@ -91,9 +91,6 @@ To receive an explanation:
91
91
92
92
The Azure API Management extension for Visual Studio Code provides a debugging experience that allows you to step through the policy pipeline or set a breakpoint when you send a request to the gateway.
93
93
94
-
> [!IMPORTANT]
95
-
> Policy debugging in the Visual Studio Code extension is only supported in the API Management Developer tier.
96
-
97
94
### Initiate a debugging session
98
95
99
96
1. Open the API Management extension in Visual Studio Code.
@@ -112,7 +109,7 @@ At this point, the extension starts to establish a debugging session with the AP
112
109
113
110
When the debugging session is established, the REST Client extension opens a new editor that allows you to create and send a test HTTP request to the gateway.
114
111
115
-
You will notice the **Ocp-Apim-Debug** header has already been added to the request. This header is required and the value must be set to the service-level, all-access subscription key to trigger the debugging functionality in the API Management gateway.
112
+
The **Ocp-Apim-Debug** header is added automatically to the request. This header is required and the value must be set to the service-level, all-access subscription key to trigger the debugging functionality in the API Management gateway.
116
113
117
114
Modify the HTTP request in the editor according to your test scenario. Then click **Send Request** to send the test request to the API Management gateway.
118
115
@@ -134,10 +131,11 @@ If there is an error during policy execution, you will see the details of the er
134
131
135
132
:::image type="content" source="media/api-management-debug-policies/exception.png" alt-text="Screenshot of a policy exception in Visual Studio Code.":::
136
133
134
+
To review the request trace, select the value of the `Ocp-Apim-Trace-Location` header that is provided in the HTTP response.
135
+
137
136
> [!TIP]
138
137
> Exit the debugging session by clicking the **Stop** button when you are finished.
139
138
140
-
141
139
## Related content
142
140
143
141
+ Learn more about the [API Management extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-apimanagement).
0 commit comments