extensions/typescript-language-features/src/tsServer/serverProcess.electron.ts/getDebugPort
function getDebugPort(kind: TsServerProcessKind): number | undefined {
	if (kind === TsServerProcessKind.Syntax) {
		// We typically only want to debug the main semantic server
		return undefined;
	}
	const value = getTssDebugBrk() || getTssDebug();
	if (value) {
		const port = parseInt(value);
		if (!isNaN(port)) {
			return port;
		}
	}
	return undefined;
}