Jump to content

Recommended Posts

Posted

I will teach you how to fix your java bugs, a lot more effectively.
What you will need: https://www.jetbrains.com/idea/
 
First i will show what you will be able to do, and at the end how to set it up.
 
1. Setting Break Points:
QhGc2Dk.png
 
When JVM will reach the breakpoint, whole game will freeze(so just use it on your test server) and you will be able to see:
- Stacktrace(it tells you the path that JVM passed to reach the Break Point)
41y7Du4.png
 
- Variable values(you can change however you like)
dBqHIAO.png
 
- You can setup the Watches(if you have got access to the object, you can take look for its content)
JHxOIyp.png
 
- You can run any code fragment you like
KpsPdHq.png

 
2. You can make Break Point stop, only when condition returns true
euc4JGG.png
 
3. You can log messages to the IDE console without suspending the thread
wHgue3d.png
 
 
How to install it?
JDncjR9.png
 
1. Click Run > Edit Configurations
2. Add new Remote(we are setting up gameserver that will run on our pc, it is called remote because it is not started by IDE)
3. Set the name, click Shared Memory + Attach mode(Listen can be useful sometimes, but its faster to run the server with Attach mode), set the port(i use ports from 5005-5015)
4. Edit your StartGameServer.bat. After java add "-agentlib:jdwp=transport=dt_shmem,server=y,suspend=n,address=5007"
5. Run your server
6. In IDE click Run > Debug 'GameServer'

  • Like 1
  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..