How does an individual debug server-sided issues without being in the game?

My game’s console log’s a lot of things using prints. These are mandatory as it helps be determine what’s going on, but the issue is when I’m not online the npc controller breaks. I’m not sure if an error outputted or not but I am not able to determine the issue. I’ve also not been able to replicate the problem in studio or in a singular server. This glitch happens in real time servers with players.

What I need help with is debugging this script, I have barely any information on what circumstances must be met for the script to break as well as no errors available (Since the output is always printing).

I have 2 solutions in mind:

  1. Remove ALL prints in game to see what’s going on with that script.
  2. Wrap the entire NPC Control in a pcall and if it is to error send a message to me via discord on the error.

The issue with these solutions is that 1, it’s heavy work and time consuming as well as 2, there may not be an error at all and may require prints to debug.

So what is standard practices for dealing with errors?

You could try sending/posting the logs to an http server of your devising. Getting a free server on amazon is pretty easy. This will be useful for other things as well, I’m sure.

I’d first try to run the game in studio and let it idle for maybe an hour or two
If it still doesn’t appear, I’d try logging errors in datastores, you could access them with the command bar in studio

1 Like

For a fact I know it happens as you eliminate npcs

You really shouldn’t use the console too much, outside of debugging. It actually causes a performance hit to output, not to mention that it also prevents you from getting the information you actually need.

If you still need help with this then it would help us to see the code for the NPC controller.

1 Like