Skip to content

Debug from IntelliJ

b8tt8 edited this page Apr 12, 2021 · 2 revisions

Debugging example for IntelliJ IDEA

  • First checkout the repository with IDEA (VCS / Checkout from Version Control / Git)
  • Confirm the creation of a new IDEA project
  • Add a new Run Configuration of type Gradle like in the first screenshot below - with DEBUG=5005 gradle enables remote debugging on port 5005 (see task runOsgi in build.gradle for details)
  • Add a new Run Configuration of type Remote like in the seconds screenshot below
  • Place your breakpoints
  • Back in the Editor, select mucommander runOsgi config and click the green play button
  • After mucommander has started, select mucommander-remote-debug config and click the green debug button
  • Now you should see something like Connected to the target VM, address: 'localhost:5005', transport: 'socket'
  • If everything works like expected, IDEA will now provide debugging

Run OSGI Configuration - starting the osgi container in debug mode runOsgi config

Remote Debug Configuration - enables remote debugging and attaches the session to IDEA runOsgi config