I’m running PyCharm Pro on macOS, and was able to leverage remote debugging and a modified
Create a new “debug challenger” bot (I just copied MyBot.py to DebugBot.py) so that you have an opponent bot that won’t be trying to attach to the remote debugger.
Create a Python Remote Debug configuration per the docs at:
Create a new
./halite --no-timeout --replay-directory replays/ -vvv --width 32 --height 32 "python3 MyBot.py" "python3 DebugBot.py"
The only changes from
run_game.sh are disabling the timeout and changing one of the bots to
Sprinkle breakpoints in
MyBot.py and start your remote debug session from PyCharm. Once it is listening for remote processes, execute
./debug_game.sh to launch the game. You should see the debugger in PyCharm stop at your breakpoint.