Debugging in Java
Enable remote debugging
On the command line:
-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
- address the address to listen to. 8000 is a common value but can be changed at will.
- suspend if the JVM should wait for a debugger to connect before starting execution.
You should now be able to connect to the instance using Eclipse.
Useful command line tools
| Command | Description |
|---|---|
| jstat | Show GC information about a running process. |
| jps | Show process id of running java applications. |
| jvisulavm | Gui for showing threads, objects and b´memory from running instances. |