Debugging a JAR file with IntelliJ IDEA

Shefan Darren Ismail
2 min readDec 23, 2019

--

Debugging in Java is not at all complicated. IntelliJ offers many debugging features for Java developers (e.g. set breakpoints, evaluate expressions). Recently, I had the requirement of debugging a JAR application that required me to pass a connection string argument.

In this article, I will be running through the steps followed to achieve this using IntelliJ IDEA.

  1. Build and create the create the JAR file if you have not done it yet.
  2. Add a new Run configuration and choose JAR application as shown below.

3. You will be prompted with the following window. Here you have to simply provide the path to the JAR file and add the program argument in the relevant field. In my case it was -c “connection_string”.

4. Now you can Debug using the created run configurations.

Hope you find this blog post useful!

Cheers! :)

--

--