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

Visual Studio Code can be pretty lacking when it comes to features that could save you from a tough situation, like being able to cancel runs. Let’s set the scene: you’ve got a Logic App in VS Code consuming messages from a Service Bus queue, and let’s say that queue has, for example, 3000 messages.

When testing locally, the processing times for these runs are often frustratingly slow, and more often than not, they end up taking an astonishing amount of time to finish.

Now, picture yourself in that scenario—the runs are taking forever to complete, you’ve consumed a lot of messages, and you just want to get out of this mess. Well, killing the terminal won’t do the trick, and stopping the Logic App doesn’t help either, because as soon as you try to start it up again, those runs are still there, waiting to be processed. You can not select them and batch cancel/delete them, so, how do you get out of this situation?

One option is to download the Logic Apps – Runs Triggers extension, but by default, you can only cancel one run at a time. If you’ve got more than thirty or forty runs queued, they won’t even show up in the list, which means you’re stuck canceling just a small handful and that’s it!

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

If you’re not sure, you can move it’s 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!

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 *

turbo360

Back to Top