protected AttachingConnector findConnectorByArgKey(VirtualMachineManager vmm, String key) {
		return vmm.attachingConnectors()
				.stream()
				.filter(ac -> ac.defaultArguments().containsKey(key))
				.findFirst()
				.orElseThrow();
	}
Compute/detect the launch mode using the environment map.

<p>
It'd be nice if this were selected/specified in the script body, rather than by what options
are present in its header. The reason we can't, though, is that the JDI client thread needs
to also work within Ghidra's JVM, i.e., without launching a jshell subprocess. By far, the
simplest way to accomplish this is to keep all the logic here, and just pass the environment
map in. For the jshell-subprocess case, it's the environment map proper. For the
in-Ghidra's-VM case, it's the map we would have passed when creating the subprocess.

@return the mode.
Ghidra/Debug/Debugger-jpda/src/main/java/ghidra/dbg/jdi/rmi/jpda/JdiArguments.java