How to debug your custom scripts and server hooks

Once you have created and stored a custom script or a server hook, it will be active on the server side. But what if something goes wrong and you don't know why?

Gamedonia offers you a tool to download and debug your server scripts: the Gamedonia Server Code Debugger. It's built on the Eclipse IDE so it will present a familiar enviroment for the user.

To install and configure the debugger you need to follow these steps (for a more detailed guide check this Server Code guide section):

1. Download the Eclipse IDE for Java Developers (Luna SR2 version) from here.

2. Open it and go to Help -> Install new software...

3. Click on Add... and give the repository a name and this URL: http://download.gamedonia.com.

4. Choose the Gamedonia Tools -> Gamedonia Debugger Feature bundle, install it and restart Eclipse.

5. Now select File -> New Project -> Gamedonia -> Gamedonia Project and click Next.

6. Fill the form with you game's normal API key, master API key and Secret and click on Test. You can find those in the Game Information page of the Gamedonia Dashboard.

7. You will be given a Debugger URL like this http://192.168.1.3:8181. Use that as API URL in your initialize call or Gamedonia Prefab instead of the usual http://api.gamedonia.com. This will redirect calls to Gamedonia so that they can be debugged. Click on Finish.

8. Right click on the project folder and Debug As... -> Gamedonia Appllication. This will run the debugger. Now you can set some breakpoints, watches etc. and run your app. It will stop and run as you command like in a normal debugging enviroment.

More info here: Server code guide