Dev/eclipse/debug

From CubeiaWiki

Jump to: navigation, search

Debugging Firebase in Eclipse

If you use Eclipse to develop your artifacts, this little guide will show you how to set up Firebase for debugging.

  • Install Firebase as a stand alone server.
  • Open Eclipse, and create a new Java application run configuration:
Run > Debug Configuration > Java Application
  • On the "Main" tab, choose you project, and then the following main class:
Main class: com.game.server.bootstrap.Server 
  • On the "Arguments" tab, point out the directory in which you have installed Firebase:
Working directory ('Other'): <firebase installation directory>
  • On the same tab, also set:
Program arguments: -n singleton -i server1
VM arguments: -Djava.net.preferIPv4Stack=true
  • On the "JRE" tab, make sure a Java VM version 6 or higher is selected.
  • On the "Classpath" tab, remove all 'User Entries' and then add the following libraries from your Firebase installation instead:
bin/firebase-bootstrap.jar
lib/common/*.jar

And that's it! You can now run and debug Firebase from within Eclipse. Oh, and don't forget to drop your gar-file under game/deploy!

Personal tools