Friday Fact: Visual Studio Code Struggles with Canceling Runs (Here’s the Workaround)

  • Luis Rigueira
  • Dec 20, 2024
  • 3 min read

Visual Studio Code lacks features that can save you in difficult situations, such as canceling running executions. Imagine this scenario. You run a Logic App locally in VS Code that consumes messages from a Service Bus queue. The queue contains, for example, 3,000 messages.

When messages are available

When testing locally, these runs often process very slowly and take far longer than expected to finish.

📝 One-Minute Brief

Visual Studio Code offers limited control when canceling running Azure Logic Apps locally, which can lead to long‑running or stuck executions. This Friday Fact explains why this happens and shares a practical workaround to quickly clear pending runs and regain control during local testing.

Now picture yourself in that situation. The runs take forever to complete, and you have already consumed many messages. You just want to stop everything and recover.

Killing the terminal does not help. Stopping the Logic App does not help either. When you start it again, the same runs are still there and ready for processing. You cannot select them or cancel them in bulk. So how do you get out of this situation?

One option is to install the Logic Apps – Runs Triggers extension. However, by default, you can cancel only one run at a time. If more than thirty or forty runs queue up, most of them do not even appear. You end up canceling only a few, and nothing more.

Run Triggers

But, here’s the thing—there’s another way to solve this, and it requires understanding that Azurite is simulating the table, queue, and blob services while running your Logic App locally. A somewhat radical solution to clearing out all those pending runs is to delete the contents of this folder:

C:\Users\Your_Username\.azurelogicapps\.azurite

azurite

If you’re not sure, you can move its contents into another folder to save it just in case. Once you clear out the .azurite folder, restart VS Code, and your Logic App will run without that massive backlog of pending runs.

It’s a tricky situation that clearly needs a fix, but until then, this workaround can help you regain control. Keep reading our blog for more tips and workarounds!

To lazy to read? We’ve got you covered! Check out our video version of this content!

Hope you find this helpful! If you enjoyed the content or found it useful and wish to support our efforts to create more, you can contribute towards purchasing a Star Wars Lego for Sandro’s son!

Buy me a coffee
Author: Luis Rigueira

Luis Rigueira is a Enterprise Integration Consultant at DevScope

Leave a Reply

Your email address will not be published. Required fields are marked *

The Ultimate Cloud
Management Platform for Azure

Supercharge your Azure Cost Saving

Learn More
Turbo360 Widget

Back to Top