Remote-debug in IntelliJ is not stopping at breakpoints

Hello,

I am trying to use the remote-debug functionality of nextflow in IntelliJ on a small test workflow that I built.

I am using nextflow version 24.04.2.5914.

I followed the instructions to set the remote-debugger in IntelliJ, I set up a Remote JVM Debug configuration, pointing at port 5005 (the same port nextflow remote-debug says).

I add breakpoints into the process blocks of my nextflow workflow in IntelliJ, and then call in the Mac Terminal
nextflow -remote-debug run ./main.nf

The terminal shows:

Listening for transport dt_socket at address: 5005

In IntelliJ, with the remote JVM debug setup, I click the debug button and see the following in the debug console:

Connected to the target VM, address: 'localhost:5005', transport: 'socket'
Disconnected from the target VM, address: 'localhost:5005', transport: 'socket'

The small workflow runs to completion, without hitting the breakpoints I set. It appears that IntelliJ debugger is able to connect to nextflow, but it just runs the workflow and doesn’t go into the nextflow groovy code. The debugger doesn’t stop at any breakpoints. Am I missing a setup step?

Hello @Matt_Kendzior :slight_smile:

Welcome to the community forum.

In case you haven’t done it yet, I strongly recommend you to watch this episode of Channels, the Nextflow podcast. It explains the limitations of the current status of remote debugging, and mentions the trace file that is also very useful for debugging. It’s worth mentioning that you can interactively debug remotely executed tasks with Wave!

It depends on your pipeline, but yes, you may be. You may have to add a condition to your breakpoint, such as this.hasProperty("thisObject") && this.thisObject?.binding?.scriptPath?.toString()?.indexOf("gunzip") != -1 (if the breakpoint is in a module named gunzip of your pipeline).