title: (Remote-) Debugging Java Thick Clients categories: [cheatsheets]
This debugging technique also works if no source-code or not the complete source-code is available.
If only the .jar files are available, use a java decompiler (e.g. jd-gui) and decompile the jar-files. Make sure to check the box "realign line numbers" in the preferences of jd-gui. This ensures the lines in the source-code match the lines in the class file.
To configure the remote debugging for java-clients, use the following java command line parameters:
java -agentlib:jdwp=transport=dt_socket,server=y,address=8000,suspend=n <other arguments>
In eclipse/intelliJ, import all the source-code files to a new project.
Any occurring errors can be ignored in this case.
Configure the remote-debugger under run->configure-debugger
to match the server-ip/port.
Happy Debugging 😀