Skip to content

Debug from IntelliJ

Piotr Skowronek edited this page Jul 3, 2024 · 3 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 -Pdebug=5005 parameter, Gradle enables remote debugging on port 5005 (see task runOsgi in build.gradle for details). There's additional parameter -Psuspend=n|y where one can control as to whether execution should stop waiting for debugger to connect or not (default is 'y').
  • Add a new Run Configuration of type Remote like in the second 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

Clone this wiki locally