Skip to content

Commit c3e0cb2

Browse files
committed
Applied new layout to debugging SQ
Included a few TODO comments that are non-blocking for the PR, just ideas for future improvement
1 parent e6aa009 commit c3e0cb2

File tree

1 file changed

+54
-26
lines changed

1 file changed

+54
-26
lines changed

docs/side_quests/debugging.md

Lines changed: 54 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,9 @@
22

33
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.
44

5-
## What you should know first
5+
### Learning goals
66

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:
148

159
- **Syntax error debugging**: Using IDE features and Nextflow error messages effectively
1610
- **Channel debugging**: Diagnosing data flow issues and channel structure problems
@@ -20,11 +14,29 @@ This guide focuses on **systematic debugging techniques** for Nextflow workflows
2014

2115
By the end, you'll have a robust debugging methodology that transforms frustrating error messages into clear roadmaps for solutions.
2216

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+
2327
---
2428

25-
## 0. Warmup
29+
## 0. Get started
30+
31+
#### Open the training codespace
2632

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+
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](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.
2840

2941
```bash
3042
cd side-quests/debugging
@@ -36,13 +48,11 @@ You can set VSCode to focus on this directory:
3648
code .
3749
```
3850

39-
The directory contains example workflows with various types of bugs that we'll use for practice:
51+
#### Review the materials
4052

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:
4454

45-
```console title="Project structure"
55+
```console title="Directory contents"
4656
.
4757
├── bad_bash_var.nf
4858
├── bad_channel_shape.nf
@@ -67,19 +77,26 @@ tree .
6777
├── missing_software_with_stub.nf
6878
├── nextflow.config
6979
└── no_such_var.nf
70-
71-
1 directory, 22 files
7280
```
7381

7482
These files represent common debugging scenarios you'll encounter in real-world development.
7583

76-
### Takeaway
84+
#### Review the assignment
7785

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.
7987

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
8198

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.
83100

84101
---
85102

@@ -2285,7 +2302,12 @@ Now it's time to put the systematic debugging approach into practice. The workfl
22852302

22862303
## Summary
22872304

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? -->
22892311

22902312
**1. How to identify and fix syntax errors**:
22912313

@@ -2315,8 +2337,6 @@ In this side quest, we've learned:
23152337
- Applying resume for efficient debugging cycles
23162338
- Following a four-phase systematic debugging methodology
23172339

2318-
---
2319-
23202340
!!! tip "Quick Debugging Reference"
23212341

23222342
**Syntax errors?** → Check VSCode warnings, run `nextflow run workflow.nf -preview`
@@ -2333,7 +2353,11 @@ In this side quest, we've learned:
23332353

23342354
**Made fixes?** → Use `-resume` to save time testing: `nextflow run workflow.nf -resume`
23352355

2336-
### What's next?
2356+
---
2357+
2358+
### Additional resources
2359+
2360+
<!-- TODO: Are there any specific articles to call out / link to? -->
23372361

23382362
Check out the [Nextflow documentation](https://www.nextflow.io/docs/latest/) for more advanced debugging features and best practices. You might want to:
23392363

@@ -2343,6 +2367,10 @@ Check out the [Nextflow documentation](https://www.nextflow.io/docs/latest/) for
23432367
- Learn about other debugging tools like profiling and performance analysis
23442368
- Explore more advanced debugging techniques for complex workflows
23452369

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.
23472371

23482372
---
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

Comments
 (0)