src/vs/workbench/contrib/debug/browser/rawDebugSession.ts/RawDebugSession/dispatchRequest
class RawDebugSession:	private async dispatchRequest(request: DebugProtocol.Request, dbgr: IDebugger): Promise<void> {

		const response: DebugProtocol.Response = {
			type: 'response',
			seq: 0,
			command: request.command,
			request_seq: request.seq,
			success: true
		};

		const safeSendResponse = (response: DebugProtocol.Response) => this.debugAdapter && this.debugAdapter.sendResponse(response);

		switch (request.command) {
			case 'launchVSCode':
				try {
					let result = await this.launchVsCode(<ILaunchVSCodeArguments>request.arguments);
					if (!result.success) {
						const showResult = await this.dialogSerivce.show(Severity.Warning, nls.localize('canNotStart', "The debugger needs to open a new tab or window for the debuggee but the browser prevented this. You must give permission to continue."),
							[nls.localize('continue', "Continue"), nls.localize('cancel', "Cancel")], { cancelId: 1 });
						if (showResult.choice === 0) {
							result = await this.launchVsCode(<ILaunchVSCodeArguments>request.arguments);
						} else {
							response.success = false;
							safeSendResponse(response);
							await this.shutdown();
						}
					}
					response.body = {
						rendererDebugPort: result.rendererDebugPort,
					};
					safeSendResponse(response);
				} catch (err) {
					response.success = false;
					response.message = err.message;
					safeSendResponse(response);
				}
				break;
			case 'runInTerminal':
				try {
					const shellProcessId = await dbgr.runInTerminal(request.arguments as DebugProtocol.RunInTerminalRequestArguments, this.sessionId);
					const resp = response as DebugProtocol.RunInTerminalResponse;
					resp.body = {};
					if (typeof shellProcessId === 'number') {
						resp.body.shellProcessId = shellProcessId;
					}
					safeSendResponse(resp);
				} catch (err) {
					response.success = false;
					response.message = err.message;
					safeSendResponse(response);
				}
				break;
			default:
				response.success = false;
				response.message = `unknown request '${request.command}'`;
				safeSendResponse(response);
				break;
		}
	}