question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve task debugging by giving more context

See original GitHub issue

Most of this text comes from an email. The context is that I got on a phone call with a customer who was experiencing issues debugging an Azure Function App.

The issue

F5 debugging of a Function App would show:

> Executing task: func host start <

And then something saying that the last exit code was 1.

It wasn’t clear what the problem was, why it was failing, and we found that this would fail on func extensions install and func host install… running the func commands in the PowerShell Integrated Console or outside of VS Code in any terminal worked just fine…

The resolution

Then we realized that the customer’s default shell……… was WSL.

As you know, tasks use the default shell to run in by default. Which means that the func commands were being run in WSL which didn’t have the Core Tools installed in it so the Task threw an exit code of 1 because the command wasn’t found.

Once Aleksandar changed his default shell back to PowerShell, everything started working again.

The problem

The lack of warning on tasks as to what went wrong is very hard to debug… see above. It took an hour and a half to make this realization… And even more of the customer’s time to get to the point where they asked to get on a call…

The ask

Show the shell being used to run tasks or give more than just an exit code if possible. We need more context as what’s actually going on when a task is being run.

I think this is a generic problem with any extension that relies on tasks and not just the Azure Functions extension.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:28
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
TylerLeonhardtcommented, Mar 6, 2020

Pls no

0reactions
Tyriarcommented, Jun 30, 2022

Might have been a WSL specific thing 🤔

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to debug an increase in context switches - Stack Overflow
I am profiling two versions of a large application using Linux perf. There is a reproducible degradation of performance in one of the ......
Read more >
Customize build debug tasks with JSON files - Visual Studio ...
Learn how to customize tasks to provide some configuration details to run and debug a codebase that Visual Studio doesn't recognize.
Read more >
Improve Your Debugging Skills with Chrome DevTools (Part 2)
In this post, we cover advanced techniques using Chrome DevTools, which will further improve the skills you have obtained in the first part ......
Read more >
Debugging High Latency Due to Context Leaks | by Grab
We should always make sure to call the CancelFunc method after using contexts, to ensure that contexts and memory are not leaked. Explaining...
Read more >
Debugging in Visual Studio Code
One of the great things in Visual Studio Code is debugging support. Set breakpoints, step-in, inspect variables and more.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found