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.

Extend tasks API to allow programmatic problem matching

See original GitHub issue

The new tasks APIs (fetchTask(), executeTask(), task events…) makes it more convenient to use vscode’s own task system to spawn child process (as opposed to using something like child_process, for example). Still, AFAICT, there are two bits missing in the API:

  1. A method to get the underlying Terminal instance of a running task (maybe through TaskExecution?);

  2. Events that would be fired whenever something is written in the process’ stdout/stderr (that would probably go in the Terminal instance itself)

This would be very useful to implement UI feedback (i.e progess notifications) while using vscode’s task system. Right now, the only way I see to do that is to spawn my own proces, create an output channel and handle problem matching myself…

Does that make sense?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:20
  • Comments:26 (26 by maintainers)

github_iconTop GitHub Comments

3reactions
dbaeumercommented, Sep 26, 2018

Actually that tasks are executed in a terminal is still an implementation details (there are even legacy tasks which don’t even run in a terminal). In addition there are requests to be able to run a task in a external terminal. As soon as we would add such a API we are basically hooked into this. This is why I feel very reluctant of adding this in the API.

Adding access to stdout / stderr is a request we do have and I fully support having in the API.

1reaction
g-arjonescommented, Sep 28, 2018

@Tyriar I see… It seems that this really isin’t suited to get stdout from a task started in an integrated terminal… 😦

I will open the issue for the processId bug, I guess I can work around the other issues if I have a reliable way of getting the PID of the process currently running in the terminal

Read more comments on GitHub >

github_iconTop Results From Across the Web

Extensions Capabilities Overview - Visual Studio Code
Learn the details of what's possible with Visual Studio Code's rich extension (plug-in) API.
Read more >
RunTask - Amazon Elastic Container Service
Starts a new task using the specified task definition. You can allow Amazon ECS to place tasks for you, or you can customize...
Read more >
Use the Planner REST API - Microsoft Graph v1.0
You can use the Planner API in Microsoft Graph to create tasks and assign them to users in a group in Microsoft 365....
Read more >
Task management API | Elasticsearch Guide [8.5] | Elastic
The task API can also be used to wait for completion of a particular task. The following call will block for 10 seconds...
Read more >
Modify Remote Config programmatically - Firebase
Initialize the SDK and authorize API requests · Get the current Remote Config Template · Modify Remote Config parameters · Modify Remote Config...
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