[dotnet] only add websocket-port if connectToRunningBrowser is not set
@@ -159,6 +159,10 @@ protected override string CommandLineArguments
{
argsBuilder.Append(" --connect-existing");
}
+ else
+ {
+ argsBuilder.Append(string.Format(CultureInfo.InvariantCulture, " --websocket-port {0}", PortUtilities.FindFreePort()));
+ }
if (this.browserCommunicationPort > 0)
{
@@ -195,8 +199,6 @@ protected override string CommandLineArguments
argsBuilder.Append(" --jsdebugger");
}
- argsBuilder.Append(string.Format(CultureInfo.InvariantCulture, " --websocket-port {0}", PortUtilities.FindFreePort()));
-
return argsBuilder.ToString().Trim();
}
}
