mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 03:29:00 +01:00
support to launch debuggee from EH
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
|
||||
import uri from 'vs/base/common/uri';
|
||||
import { IDebugService, IConfig, IDebugConfigurationProvider, IBreakpoint, IFunctionBreakpoint, IBreakpointData, IAdapterExecutable } from 'vs/workbench/parts/debug/common/debug';
|
||||
import { IDebugService, IConfig, IDebugConfigurationProvider, IBreakpoint, IFunctionBreakpoint, IBreakpointData, IAdapterExecutable, ITerminalLauncher, ITerminalSettings } from 'vs/workbench/parts/debug/common/debug';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import {
|
||||
ExtHostContext, ExtHostDebugServiceShape, MainThreadDebugServiceShape, DebugSessionUUID, MainContext,
|
||||
@@ -54,7 +54,7 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape {
|
||||
|
||||
this._debugAdapters = new Map<number, ExtensionHostDebugAdapter>();
|
||||
|
||||
// register a default DA provider
|
||||
// register a default EH DA provider
|
||||
debugService.getConfigurationManager().registerDebugAdapterProvider('*', {
|
||||
createDebugAdapter: (debugType, adapterInfo) => {
|
||||
const handle = this._debugAdaptersHandleCounter++;
|
||||
@@ -63,6 +63,9 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape {
|
||||
return da;
|
||||
}
|
||||
});
|
||||
|
||||
// register a default EH terminal launcher
|
||||
debugService.getConfigurationManager().registerEHTerminalLauncher(new ExtensionHostTerminalLauncher(this._proxy));
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
@@ -281,3 +284,13 @@ class ExtensionHostDebugAdapter extends AbstractDebugAdapter {
|
||||
return this._proxy.$stopDASession(this._handle);
|
||||
}
|
||||
}
|
||||
|
||||
class ExtensionHostTerminalLauncher implements ITerminalLauncher {
|
||||
|
||||
constructor(private _proxy: ExtHostDebugServiceShape) {
|
||||
}
|
||||
|
||||
runInTerminal(args: DebugProtocol.RunInTerminalRequestArguments, config: ITerminalSettings): TPromise<void> {
|
||||
return this._proxy.$runInTerminal(args, config);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user