Skip to content

Commit

Permalink
Revert #54397
Browse files Browse the repository at this point in the history
This reverts commit a8e6a91.
  • Loading branch information
isidorn committed Dec 6, 2018
1 parent bdd4c66 commit b2e8dcc
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/vs/workbench/parts/debug/electron-browser/debugService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -718,20 +718,16 @@ export class DebugService implements IDebugService {
// task is already running - nothing to do.
return Promise.resolve(null);
}
once(TaskEventKind.Active, this.taskService.onDidStateChange)(taskEvent => {
once(TaskEventKind.Active, this.taskService.onDidStateChange)((taskEvent) => {
// Task is active, so everything seems to be fine, no need to prompt after 10 seconds
// Use case being a slow running task should not be prompted even though it takes more than 10 seconds
if (taskEvent.taskId === task._id) {
taskStarted = true;
}
taskStarted = true;
});
const taskPromise = this.taskService.run(task);
if (task.isBackground) {
return new Promise((c, e) => once(TaskEventKind.Inactive, this.taskService.onDidStateChange)(taskEvent => {
if (taskEvent.taskId === task._id) {
taskStarted = true;
c(null);
}
return new Promise((c, e) => once(TaskEventKind.Inactive, this.taskService.onDidStateChange)(() => {
taskStarted = true;
c(null);
}));
}

Expand Down

0 comments on commit b2e8dcc

Please sign in to comment.