Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for remote debug #4266

Merged
merged 4 commits into from
Sep 4, 2023
Merged

Add support for remote debug #4266

merged 4 commits into from
Sep 4, 2023

Conversation

pditommaso
Copy link
Member

@pditommaso pditommaso commented Sep 3, 2023

This PR adds the support for remote debugging aka IDE interactive debug to Nextflow script, following the method proposed by Jorge Aguilera in PR #3197.

The remote debug can be enabled by using the top level option -remote-debug both for nextflow and launch.sh script (for development purposes).

By default it uses the port 5005. it can be overridden with by using the env variable NXF_REMOTE_DEBUG_PORT.

Credits https://fediverse.tv/w/3dsuE1tX25orRLmNYtBJrD

@pditommaso pditommaso marked this pull request as draft September 3, 2023 16:01
@netlify
Copy link

netlify bot commented Sep 3, 2023

Deploy Preview for nextflow-docs-staging ready!

Name Link
🔨 Latest commit aa3054b
🔍 Latest deploy log https://app.netlify.com/sites/nextflow-docs-staging/deploys/64f648f13fbadb0008b6dbe5
😎 Deploy Preview https://deploy-preview-4266--nextflow-docs-staging.netlify.app/cli
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@bentsherman bentsherman linked an issue Sep 3, 2023 that may be closed by this pull request
@pditommaso pditommaso mentioned this pull request Sep 4, 2023
@pditommaso
Copy link
Member Author

The problem of this approach is that as along as it parses the script file, the computeClassName is ignored.

As a side effect, script containing an identifier as the file name (that's compiled into the class name) will throw an error. For example having a script hello.nf with the content

hello = 1 
println hello

@pditommaso pditommaso marked this pull request as ready for review September 4, 2023 20:30
Signed-off-by: Paolo Di Tommaso <[email protected]>
@pditommaso
Copy link
Member Author

Ok, merging this as an experimental feature. It will be needed #4267 for a more soluting support.

@pditommaso pditommaso merged commit 87e0648 into master Sep 4, 2023
9 checks passed
@pditommaso pditommaso deleted the remote-debugging branch September 4, 2023 21:21
@pditommaso pditommaso added this to the 23.10.0 milestone Sep 10, 2023
abhi18av pushed a commit to abhi18av/nextflow that referenced this pull request Oct 28, 2023
This commit adds the a possibility to compile nextflow scripts with debugging 
information and debug them interactively via a remote debugger commonly available 
via IntellJ or similar IDE. 

To enable this feature it should the top-level command line option `-remote-debug`, 
when specified the execution of nextflow stops and wait for the starting of a debugging session 
in the IDE. By default, the TCP port 5005 is used. It can be changed by using the environment 
variable NXF_REMOTE_DEBUG_PORT. 

Credits: Jorge Aguilera 

Signed-off-by: Paolo Di Tommaso <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Debug scripts
1 participant