# Best way to debug server side RPC

**URL:** <https://forum.heroiclabs.com/t/best-way-to-debug-server-side-rpc/2575>\
**Category:** Game Design\
**Tags:** server-framework, typescript\
**Created:** [April 28, 2022, 2:55pm UTC](https://forum.heroiclabs.com/t/best-way-to-debug-server-side-rpc/2575 "2022-04-28T14:55:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![solidsnakeit](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@solidsnakeit](https://forum.heroiclabs.com/u/solidsnakeit)\
**Post date:** [April 28, 2022, 2:55pm UTC](https://forum.heroiclabs.com/t/best-way-to-debug-server-side-rpc/2575/1 "2022-04-28T14:55:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sean](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sean/32/643_2.png) [@sean](https://forum.heroiclabs.com/u/sean)\
**Post date:** [April 29, 2022, 8:05am UTC](https://forum.heroiclabs.com/t/best-way-to-debug-server-side-rpc/2575/2 "2022-04-29T08:05:22Z")

</div>

Hey @solidsnakeit,

## 1. Workflow

I’d suggest using a [local development server](https://heroiclabs.com/docs/nakama/getting-started/install/docker/) 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](https://heroiclabs.com/docs/nakama/server-framework/setup/typescript/) 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](https://heroiclabs.com/docs/nakama/server-framework/setup/typescript/#develop-code) of our TypeScript setup guide.

Kind regards,  
Sean
