Skip to content

Commit 595e10d

Browse files
committed
Add Rider debug notes, remove references to port.cfg
1 parent 413df4d commit 595e10d

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

CSharpBot/Bot/Program.cs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,24 @@ static void Main(string[] args)
1414
}
1515
catch (Exception e)
1616
{
17-
// If you're trying to run in a debugger, look up the port number used in PythonAgent.py
18-
// Right-click the project, choose Properties, go to the Debugging section -- there is a box for "Command Arguments", enter the port there.
17+
// If you're trying to run in a debugger, look up the port number used in PythonAgent.py in get_port()
18+
19+
// If you're using Visual Studio:
20+
// Right-click the project, choose Properties, go to the Debug section -- there is a box for
21+
// "Command line arguments", enter the port there.
22+
23+
// If you're using Rider:
24+
// Click the configuration dropdown to the left of the Run and Debug buttons (top right of the window),
25+
// choose Edit Configurations -- there is a box for "Program arguments", enter the port there.
26+
1927
// Example: 45031
2028
Console.WriteLine("Could not get port from arguments to CSharp bot!");
2129
throw e;
2230
}
2331

2432
RLBotDotNet.BotManager<Bot> botManager = new RLBotDotNet.BotManager<Bot>(0);
25-
// Start the server on the port given in the port.cfg file.
33+
// Start the server on the port given in the first argument
2634
botManager.Start(port);
2735
}
2836
}
29-
}
37+
}

PythonAgent/PythonAgent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
class DotNetBot(ExecutableWithSocketAgent):
77
def get_port(self) -> int:
8-
return 45031 # Should match port.cfg in the C# area
8+
return 45031 # The port given to the executable in the program arguments
99

1010
def load_config(self, config_header: ConfigHeader):
1111
self.executable_path = config_header.getpath('executable_path')

0 commit comments

Comments
 (0)