I am writing an vscode extension. I created a TaskProvider and registered some tasks to do some jobs before launching debug.
const task = new vscode.Task(
taskDefinition,
scope,
name,
source,
new vscode.ShellExecution("run some external command", options),
problemMatchers
);
I can register a onDidEndTaskProcess
handler to get the exit code when a task process exits.
extensionContext.subscriptions.push(vscode.tasks.onDidEndTaskProcess(onDidEndTaskProcessHandler))
But from the vscode document, vscode.TaskProcessEndEvent
only has an exitCode
without other detailed information.
I would like to get the Error object and standard error of the process. Is there any way to do that?
Or is there any other better ways to determine why the task fails?