You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/side_quests/debugging.md
+54-26Lines changed: 54 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,15 +2,9 @@
2
2
3
3
Debugging is a critical skill that can save you hours of frustration and help you become a more effective Nextflow developer. Throughout your career, especially when you're starting out, you'll encounter bugs while building and maintaining your workflows. Learning systematic debugging approaches will help you identify and resolve issues quickly.
4
4
5
-
##What you should know first
5
+
### Learning goals
6
6
7
-
This guide assumes you've completed the [Hello Nextflow](../hello_nextflow/) training course and are comfortable with foundational Nextflow concepts including basic workflow structure, processes, channels, and configuration.
8
-
9
-
This guide focuses on debugging techniques and workflows. For comprehensive coverage of IDE features that support debugging (syntax highlighting, error detection, etc.), see the dedicated [IDE Features for Nextflow Development](ide_features.md) side quest. We recommend completing the IDE training beforehand.
10
-
11
-
## What you'll learn here
12
-
13
-
This guide focuses on **systematic debugging techniques** for Nextflow workflows:
7
+
In this side quest, we'll explore **systematic debugging techniques** for Nextflow workflows:
14
8
15
9
-**Syntax error debugging**: Using IDE features and Nextflow error messages effectively
16
10
-**Channel debugging**: Diagnosing data flow issues and channel structure problems
@@ -20,11 +14,29 @@ This guide focuses on **systematic debugging techniques** for Nextflow workflows
20
14
21
15
By the end, you'll have a robust debugging methodology that transforms frustrating error messages into clear roadmaps for solutions.
22
16
17
+
### Prerequisites
18
+
19
+
Before taking on this side quest, you should:
20
+
21
+
- Have completed the [Hello Nextflow](../hello_nextflow/README.md) tutorial or equivalent beginner's course.
22
+
- Be comfortable using basic Nextflow concepts and mechanisms (processes, channels, operators)
23
+
24
+
**Optional:** We recommend completing the [IDE Features for Nextflow Development](./ide_features.md) side quest first.
25
+
That covers comprehensive coverage of IDE features that support debugging (syntax highlighting, error detection, etc.), which we'll use heavily here.
26
+
23
27
---
24
28
25
-
## 0. Warmup
29
+
## 0. Get started
30
+
31
+
#### Open the training codespace
26
32
27
-
Let's move into the debugging exercise directory:
33
+
If you haven't yet done so, make sure to open the training environment as described in the [Environment Setup](../envsetup/index.md).
34
+
35
+
[](https://codespaces.new/nextflow-io/training?quickstart=1&ref=master)
36
+
37
+
#### Move into the project directory
38
+
39
+
Let's move into the directory where the files for this tutorial are located.
28
40
29
41
```bash
30
42
cd side-quests/debugging
@@ -36,13 +48,11 @@ You can set VSCode to focus on this directory:
36
48
code .
37
49
```
38
50
39
-
The directory contains example workflows with various types of bugs that we'll use for practice:
51
+
#### Review the materials
40
52
41
-
```bash
42
-
tree .
43
-
```
53
+
You'll find a set of example workflows with various types of bugs that we'll use for practice:
44
54
45
-
```console title="Project structure"
55
+
```console title="Directory contents"
46
56
.
47
57
├── bad_bash_var.nf
48
58
├── bad_channel_shape.nf
@@ -67,19 +77,26 @@ tree .
67
77
├── missing_software_with_stub.nf
68
78
├── nextflow.config
69
79
└── no_such_var.nf
70
-
71
-
1 directory, 22 files
72
80
```
73
81
74
82
These files represent common debugging scenarios you'll encounter in real-world development.
75
83
76
-
###Takeaway
84
+
#### Review the assignment
77
85
78
-
You're set up with example files containing various types of bugs that we'll debug systematically throughout this guide.
86
+
Your challenge is to run each workflow, identify the error(s) and fix it.
79
87
80
-
### What's next?
88
+
<!-- TODO: give a bit more details, similar to how it's done in the Metadata side quest -->
89
+
90
+
#### Readiness checklist
91
+
92
+
Think you're ready to dive in?
93
+
94
+
-[ ] I understand the goal of this course and its prerequisites
95
+
-[ ] My codespace is up and running
96
+
-[ ] I've set my working directory appropriately
97
+
-[ ] I understand the assignment
81
98
82
-
Learn to identify and fix the most common type of error: syntax errors.
99
+
If you can check all the boxes, you're good to go.
83
100
84
101
---
85
102
@@ -2285,7 +2302,12 @@ Now it's time to put the systematic debugging approach into practice. The workfl
2285
2302
2286
2303
## Summary
2287
2304
2288
-
In this side quest, we've learned:
2305
+
In this side quest, you've learned a set of systematic techniques for debugging Nextflow workflows.
2306
+
Applying these techniques in your own work will enable you to
2307
+
2308
+
### Key patterns
2309
+
2310
+
<!-- TODO: Can we add snippets of code below to illustrate? -->
2289
2311
2290
2312
**1. How to identify and fix syntax errors**:
2291
2313
@@ -2315,8 +2337,6 @@ In this side quest, we've learned:
2315
2337
- Applying resume for efficient debugging cycles
2316
2338
- Following a four-phase systematic debugging methodology
2317
2339
2318
-
---
2319
-
2320
2340
!!! tip "Quick Debugging Reference"
2321
2341
2322
2342
**Syntax errors?** → Check VSCode warnings, run `nextflow run workflow.nf -preview`
@@ -2333,7 +2353,11 @@ In this side quest, we've learned:
2333
2353
2334
2354
**Made fixes?** → Use `-resume` to save time testing: `nextflow run workflow.nf -resume`
2335
2355
2336
-
### What's next?
2356
+
---
2357
+
2358
+
### Additional resources
2359
+
2360
+
<!-- TODO: Are there any specific articles to call out / link to? -->
2337
2361
2338
2362
Check out the [Nextflow documentation](https://www.nextflow.io/docs/latest/) for more advanced debugging features and best practices. You might want to:
2339
2363
@@ -2343,6 +2367,10 @@ Check out the [Nextflow documentation](https://www.nextflow.io/docs/latest/) for
2343
2367
- Learn about other debugging tools like profiling and performance analysis
2344
2368
- Explore more advanced debugging techniques for complex workflows
2345
2369
2346
-
Remember: Effective debugging is a skill that improves with practice. The systematic methodology and comprehensive toolkit you've developed here will serve you well throughout your Nextflow development journey.
2370
+
**Remember:** Effective debugging is a skill that improves with practice. The systematic methodology and comprehensive toolkit you've acquired here will serve you well throughout your Nextflow development journey.
2347
2371
2348
2372
---
2373
+
2374
+
## What's next?
2375
+
2376
+
Return to the [menu of Side Quests](./index.md) or click the button in the bottom right of the page to move on to the next topic in the list.
0 commit comments