src/vs/workbench/api/browser/mainThreadDebugService.ts/MainThreadDebugService/$registerDebugAdapterDescriptorFactory
class MainThreadDebugService:	public $registerDebugAdapterDescriptorFactory(debugType: string, handle: number): Promise<void> {

		const provider = <IDebugAdapterDescriptorFactory>{
			type: debugType,
			createDebugAdapterDescriptor: session => {
				return Promise.resolve(this._proxy.$provideDebugAdapter(handle, this.getSessionDto(session)));
			}
		};
		this._debugAdapterDescriptorFactories.set(handle, provider);
		this._toDispose.add(this.debugService.getAdapterManager().registerDebugAdapterDescriptorFactory(provider));

		return Promise.resolve(undefined);
	}