API: expose debug console; fixes #36753

This commit is contained in:
Andre Weinand
2017-10-24 13:03:05 +02:00
parent fa4c5561c9
commit af809a59db
5 changed files with 62 additions and 2 deletions

View File

@@ -11,6 +11,7 @@ import { TPromise } from 'vs/base/common/winjs.base';
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
import { ExtHostContext, ExtHostDebugServiceShape, MainThreadDebugServiceShape, DebugSessionUUID, MainContext, IExtHostContext } from '../node/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import severity from 'vs/base/common/severity';
@extHostNamedCustomer(MainContext.MainThreadDebugService)
export class MainThreadDebugService implements MainThreadDebugServiceShape {
@@ -93,4 +94,10 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape {
}
return TPromise.wrapError(new Error('debug session not found'));
}
public $appendDebugConsole(value: string): TPromise<any> {
// Use warning as severity to get the orange color for messages coming from the debug extension
this.debugService.logToRepl(value, severity.Warning);
return TPromise.as<void>(undefined);
}
}