Policy Debugging using Visual Studio Code
  • 01 Feb 2021
  • 1 Minute To Read
  • Contributors
  • Print
  • Comments
  • Share
  • Dark
    Light

Policy Debugging using Visual Studio Code

  • Print
  • Comments
  • Share
  • Dark
    Light

#ServerlessTips - API Management
Author: Hussein Awad, Senior Cloud Application Architect

This article shall cover how you could use Visual Studio Code with Azure API Management Extension to help you debug your different policy scopes within Azure API Management. This is an exclusive feature is the Developer tier for API Management. Here’s what you need to do.

  1. Download & install Visual Studio Code.
  2. Download & install Azure API Management Extension.
  3. Sign in to your Azure account, as shown in the picture.
    image.png
  4. After signing into your Azure account, you should view the subscriptions you have in your Azure account, along with the other API Managements those you have already created.
    image.png
  5. Then, go to your API that you want to debug, right click, and choose “start policy debugging”.
    image.png
  6. Then, you need to go ahead and click on “Send Request.”
    image.png
  7. Then you should be able to use the usual debugging menu to perform step-by-step debugging of your policy.
    image.png
  8. Once you finish debugging your policy, you should see the HTTP response that would be usually rendered on calling that API.
    image.png
Was This Article Helpful?