Realtime Gamelift Script Server Questions

For a gamelift realtime script, how do I set remote breakpoints for debugging the script?

How do I develop on a local instance for a gamelift realtime script? (Not a custom gameserver build, a realtime script)

I need to find a better workflow for debugging. Currently I have to upload a script to debug but I run into limitations with that.

Right now I believe there is no method to locally run the script. Having written a few realtime scripts I share your pain on this.

I’ll reach out to the GameLift service team as things may have changed since I worked with Realtime scripts.

For remote debugging, you can open any port on the fleet but that may not be enough for what is required as you can’t launch the script with -inspect AFAIK.

1 Like

Thanks for letting me know your thoughts. This is definitely a major pain point of mine right now. The problems I keep running into with realtime script debugging:
-Not verbose enough logs and no control over that
(i.e. -inspect, etc.)

-I have to spend time finding the correct log by ssh if downloading it directly is not possible for some reason through the AWS console

-I have to spend time uploading, which I’ve made a script to help automate but still takes time to run

So basically the feedback loop is very long if I want to test and verify simple things. I end up debugging blind in some situations and it becomes a huge time sink.

You have any ideas/thoughts on how to locate the right log faster for situations where downloading the log via AWS console is not possible @Pip ? Any idea what the directory names are? Are they PIDs of some kind? They’re all just numbers.

You can remote into the instance and tail the logs live on the box. Thats the faster path to debugging that I know of.

For a windows fleet theres good information here: Windows Remote Access won't connect to GameLift Fleet, what am I doing wrong?

If you need help for Linux fleets, let me know.

A bit late, but the attached may help. monitor.txt (2.8 KB)

Basically it “tails” all the logs (there are lots, especially if your app keeps crashing) so you get the log output in real time.

Instructions (setup):

  1. Rename file as “.js” (I had to put as .txt to upload here)
  2. Put into the server app path so it gets uploaded to the “etag” directory one each deploy.
  3. Add into package.json

Instructions (to run):

  1. SSH in to the instance to monitor.
  2. You need to run as root (sudo).
  3. cd to any “etag” (in /local/game - can be any of the etags, does not need to be the “latest” if you are doing multiple deploys)
  4. Run: /local/NodeJS/bin/node ./monitor.js


  • Currently monitors last 10 files; each “server” (i.e. how many times your run your .js as set in console/CFN) creates a log file, so if you have more than 5 servers (on the single instance) then you might want to increase this. Of course there is performance hit, but for debugging you should be fine. [Monitor twice the files so you get the crash logs of the old ones)
  • Keep your etags clean with ls -td /local/game/etag-* | tail -n +3 | head -n -1 | sudo xargs rm -rf --
  • Keep your logs clean with cd /local/game/logs/ ls -t | tail -n +20 | sudo xargs rm -rf --
1 Like

@Robbie - Thank you for sharing this. I will get back to you with how it works out for me. It seems very promising. Thank you so much!

I was on vacation last week, and restrained myself from trying your script. So I finally tried it today, and wow. This is exactly what I needed. Thank you. This will help me out so much. Can’t thank you enough @Robbie :smile:

Thanks for the feedback.

1 Like