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 
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).
Thank you for information @mribeirodantas , so you mean that the breakpoint on IDE has no effect and can only be set in debugging interactive mode, isn’t? I hope you can help me clarify this. Thanks.
Hi @Phi_Nguyen. For the remote-debug that we experimented with a few years ago, yes.
Thank for your clarification @mribeirodantas, I still have some related questions, hope you could point me out:
- I saw in [debugging podcast](https://youtu.be/jtdlJQEOA1g?si=Pz-OZvmsMLgg3mRk&t=4m37s), you were able to set a breakpoint directly on IDE. How did you do that? Is there anything special in your
launch.sh?
- Can I set a breakpoint according to the line number in a Nextflow script? Is there a related guideline for debugging syntax?
Thank you for your support.
To be fair, @Phi_Nguyen, this has been so long in the past that I am not 100% sure about the content of launch.sh, but setting the breakpoint directly in the IDE was just like you’d add a breakpoint to anything else, nothing specific to Nextflow.
You still needed to add that condition to the breakpoint (e.g. this.hasProperty("thisObject") && this.thisObject?.binding?.scriptPath?.toString()?.indexOf("gunzip") != -1).
Thinking about it in 2026, I wouldn’t try to debug my pipeline like that. I would do a mix of unitary tests with nf-test and debug with Seqera AI.