support debugPort in EH

This commit is contained in:
Andre Weinand
2018-05-08 23:01:34 +02:00
parent 211d2ea5c2
commit 8b84e962d1
8 changed files with 87 additions and 65 deletions

View File

@@ -61,9 +61,9 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape, IDeb
this._toDispose.push(this.debugService.getConfigurationManager().registerDebugAdapterProvider(debugTypes, this));
}
createDebugAdapter(debugType: string, adapterInfo): IDebugAdapter {
createDebugAdapter(debugType: string, adapterInfo, debugPort: number): IDebugAdapter {
const handle = this._debugAdaptersHandleCounter++;
const da = new ExtensionHostDebugAdapter(handle, this._proxy, debugType, adapterInfo);
const da = new ExtensionHostDebugAdapter(handle, this._proxy, debugType, adapterInfo, debugPort);
this._debugAdapters.set(handle, da);
return da;
}
@@ -262,7 +262,7 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape, IDeb
*/
class ExtensionHostDebugAdapter extends AbstractDebugAdapter {
constructor(private _handle: number, private _proxy: ExtHostDebugServiceShape, private _debugType: string, private _adapterExecutable: IAdapterExecutable | null) {
constructor(private _handle: number, private _proxy: ExtHostDebugServiceShape, private _debugType: string, private _adapterExecutable: IAdapterExecutable | null, private _debugPort: number) {
super();
}
@@ -275,7 +275,7 @@ class ExtensionHostDebugAdapter extends AbstractDebugAdapter {
}
public startSession(): TPromise<void> {
return this._proxy.$startDASession(this._handle, this._debugType, this._adapterExecutable);
return this._proxy.$startDASession(this._handle, this._debugType, this._adapterExecutable, this._debugPort);
}
public sendMessage(message: DebugProtocol.ProtocolMessage): void {