Kohei Nozaki's blog 

Entries tagged [debug]

Remote debugging of standalone application with IntelliJ IDEA


Posted on Friday Feb 06, 2015 at 11:08AM in Technology


Environment

  • IntelliJ IDEA 14.0.3

  • Oracle JDK 8u20

  • OS X 10.9

Procedure

  1. Open/create/import a project of the target application in IntelliJ IDEA

  2. Attach additional sources such as dependencies if you need it. it can be attached from Project Structure ⇒ Libraries.

  3. Set breakpoints as you desired

  4. Open Edit Configurations…​

  5. Click + button

  6. Click Remote

  7. Look Configuration tab and copy the fragment in Command line arguments for running remote JVM as follows:

    -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
  8. Click OK

  9. Launch target application with preceding argument which copied

  10. Click insect icon on upper-right