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

📜 WIP Debugger explained #5219

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions content/adventures/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -734,13 +734,27 @@ adventures:
description: debugging adventure
levels:
1:
story_text: |-
Welcome to a debugging adventure. Debugging a code means getting rid of mistakes in the code.
That means that in these debugging adventures, we will show you code that does not work yet.
You will have to figure out what's wrong and correct the mistakes.

story_text: |
### Exercise
Debug this code. Good luck!


**How to debug a code**

Watch this <a href="https://www.youtube.com/watch?v=jwitgommeRY;t=2s" target="_blank">video</a> to see how the debugger works, or read the instructions.

Of course you could just look at the code and find the mistakes yourself, but we also have some tools to help you.
Click on the ladybug 🐞 button beneath your input field. This starts the **debugger**. With the debugger you can run a program line-by-line.
If there is a big mistake in your code (like in the debugging adventures) the debugger will tell you to fix the big mistakes first. Read the error messages to find out how to fix the mistakes.
If the major mistakes are gone, the debugger will run your program line by line.
To run the next line, click on the ⏭️button on the right. Is the line doing what it's supposed to do? Great! Click the button again to run the next line until your program is working perfectly.
To stop the debugger, click on the 🛑 button in the middle.
To start running your code from the top, click the 🔁 button on the left.


Did you get stuck on a line of code and do you want to try your program without that line?
You can disable a line of code by clicking in front of the line number. A sleeping emoji 😴 will appear and the line will be crossed out.
The line will now be skipped when running the code. To reactivate the line, simply click the sleeping emoji and the line won't be skipped anymore.
example_code: |
**Warning! This code needs to be debugged!**
```
Expand Down
Loading