Best way to debug server side RPC

Good afternoon,

I’m currently writing a server function in typescript.
I am a typescript newbie and I admit I struggle a lot.

I have two questions:

  1. what is the best workflow about server side developing? (now I write code in visual studio, copy the file to the server, compile type script, restart the service and run in nakama console… too much boring)

  2. I made mistakes: is there a “console” or in any case a way to debug?

thank you

Hey @solidsnakeit,

1. Workflow

I’d suggest using a local development server and putting your files in your server’s “modules” directory (inside the docker project folder) and edit them there.

You can watch typescript files for changes with npx tsc -w.

Take a look at our Server Framework TypeScript setup guide and video for more setup information.

2. Debug output

Each Nakama function receives a logger, you can use logger.info to debug output, see the develop code section of our TypeScript setup guide.

Kind regards,
Sean