@Override
	public VirtualMachine addVM(Connector cx, List<String> args) {
		Map<String, Connector.Argument> arguments = cx.defaultArguments();
		if (cx instanceof LaunchingConnector) {
			if (arguments.containsKey("command")) {
				arguments.get("command").setValue(args.get(0));
			}
			else {
				arguments.get("main").setValue(args.get(0));
			}
		}
		if (cx instanceof AttachingConnector) {
			if (arguments.containsKey("pid")) {
				arguments.get("pid").setValue("" + Integer.decode(args.get(0)));
			}
			else {
				if (args.size() == 2) {
					arguments.get("hostname").setValue(args.get(0));
					arguments.get("port").setValue(args.get(1));
				}
				else {
					arguments.get("port").setValue(args.get(0));
				}
			}
		}
		if (cx instanceof ListeningConnector) {
			arguments.get("port").setValue("0");
			arguments.get("localAddress").setValue("localhost");
		}
		return addVM(cx, arguments);
	}
NB: can't use manager.connectedVMs, because technically, other things could be using the
JDI outside of this manager.
Ghidra/Debug/Debugger-jpda/src/main/java/ghidra/dbg/jdi/manager/impl/JdiManagerImpl.java