Debug API Management policies in real time

Microsoft recently announced that the latest release of the Visual Studio Code extension for API Management introduces the ability to debug policies configured in your Azure API Management services in real-time.

When you use this new feature, you can use most of the debugging features you’d expect from a modern runtime environment:

  • Initiate remote debugging input your API Management instances
  • Set breakpoints in the policy code
  • Step into/over statements and expressions
  • Inspect properties of the request context
  • Inspect policy errors during execution
debugPolicy

(gif animation from the official extension docs)

I have awaited this feature for SO long, and I’m very excited to get some hands-on experience with it in real-world projects; my initial tests show that it’s still a bit rough on the edges. I do expect, though, that this will speed up the development of APIM Policies by an order of magnitude.

Note

This feature is in public preview, and only available in the Developer tier.

 

1