@@ -47,7 +47,7 @@ import { EXTENSION_LOG_BROADCAST_CHANNEL, EXTENSION_ATTACH_BROADCAST_CHANNEL, EX
4747import { IBroadcastService , IBroadcast } from 'vs/platform/broadcast/electron-browser/broadcastService' ;
4848import { IRemoteConsoleLog , parse , getFirstFrame } from 'vs/base/node/console' ;
4949import { Source } from 'vs/workbench/parts/debug/common/debugSource' ;
50- import { TaskEvent , TaskEventKind } from 'vs/workbench/parts/tasks/common/tasks' ;
50+ import { TaskEvent , TaskEventKind , TaskIdentifier } from 'vs/workbench/parts/tasks/common/tasks' ;
5151import { IDialogService } from 'vs/platform/dialogs/common/dialogs' ;
5252import { INotificationService } from 'vs/platform/notification/common/notification' ;
5353import { IAction , Action } from 'vs/base/common/actions' ;
@@ -1029,16 +1029,16 @@ export class DebugService implements debug.IDebugService {
10291029 } ) ;
10301030 }
10311031
1032- private runTask ( sessionId : string , root : IWorkspaceFolder , taskName : string ) : TPromise < ITaskSummary > {
1033- if ( ! taskName || this . skipRunningTask ) {
1032+ private runTask ( sessionId : string , root : IWorkspaceFolder , taskId : string | TaskIdentifier ) : TPromise < ITaskSummary > {
1033+ if ( ! taskId || this . skipRunningTask ) {
10341034 this . skipRunningTask = false ;
10351035 return TPromise . as ( null ) ;
10361036 }
1037-
10381037 // run a task before starting a debug session
1039- return this . taskService . getTask ( root , taskName ) . then ( task => {
1038+ return this . taskService . getTask ( root , taskId ) . then ( task => {
1039+ const taskDisplayName = typeof taskId === 'string' ? `'${ taskId } '` : nls . localize ( 'specified' , "specified" ) ;
10401040 if ( ! task ) {
1041- return TPromise . wrapError ( errors . create ( nls . localize ( 'DebugTaskNotFound' , "Could not find the task \' {0}\' ." , taskName ) ) ) ;
1041+ return TPromise . wrapError ( errors . create ( nls . localize ( 'DebugTaskNotFound' , "Could not find the task {0}." , taskDisplayName ) ) ) ;
10421042 }
10431043
10441044 function once ( kind : TaskEventKind , event : Event < TaskEvent > ) : Event < TaskEvent > {
@@ -1082,7 +1082,7 @@ export class DebugService implements debug.IDebugService {
10821082
10831083 setTimeout ( ( ) => {
10841084 if ( ! taskStarted ) {
1085- e ( { severity : severity . Error , message : nls . localize ( 'taskNotTracked' , "The task ' {0}' cannot be tracked." , taskName ) } ) ;
1085+ e ( { severity : severity . Error , message : nls . localize ( 'taskNotTracked' , "The task {0} cannot be tracked." , taskDisplayName ) } ) ;
10861086 }
10871087 } , 10000 ) ;
10881088 } ) ;
0 commit comments