debugging-java-thick-clients.md 989 B


title: (Remote-) Debugging Java Thick Clients categories: [cheatsheets]

tags: [security]

(Remote-) Debugging Java Thick Clients

This debugging technique also works if no source-code or not the complete source-code is available.

Blackbox

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.

Config

Java

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>

Eclipse

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 😀