From 5e2c118d5b114d325bad5fbf379c85c26005e1b8 Mon Sep 17 00:00:00 2001 From: MarleenGilsing <80678586+MarleenGilsing@users.noreply.github.com> Date: Thu, 7 Mar 2024 11:47:35 +0100 Subject: [PATCH 1/4] Debugger explained --- content/adventures/en.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/content/adventures/en.yaml b/content/adventures/en.yaml index 9d9786c6818..d69f48264ee 100644 --- a/content/adventures/en.yaml +++ b/content/adventures/en.yaml @@ -730,6 +730,23 @@ adventures: ### Exercise Debug this code. Good luck! + + **How to debug a code** + + 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!** ``` From b3585e9ab1c1e4464ae49cc95fd90e6f15e30ac9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 7 Mar 2024 10:52:27 +0000 Subject: [PATCH 2/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- content/adventures/en.yaml | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/content/adventures/en.yaml b/content/adventures/en.yaml index d69f48264ee..a49d617c6d9 100644 --- a/content/adventures/en.yaml +++ b/content/adventures/en.yaml @@ -723,30 +723,12 @@ 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. - - ### Exercise - Debug this code. Good luck! - - **How to debug a code** - - 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. - - + story_text: "Welcome to a debugging adventure. Debugging a code means getting rid of mistakes in the code.\nThat means that in these debugging adventures, we will show you code that does not work yet.\nYou will have to figure out what's wrong and correct the mistakes.\n\n### Exercise\n\ + Debug this code. Good luck!\n\n**How to debug a code**\n\nOf course you could just look at the code and find the mistakes yourself, but we also have some tools to help you.\nClick on the ladybug \U0001F41E button beneath your input field. This starts the **debugger**. With the debugger\ + \ you can run a program line-by-line.\nIf 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.\n\nIf the major mistakes are gone, the debugger will\ + \ run your program line by line.\nTo 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.\nTo stop the debugger, click on the \U0001F6D1 button\ + \ in the middle.\nTo start running your code from the top, click the \U0001F501 button on the left.\n\nDid you get stuck on a line of code and do you want to try your program without that line?\nYou can disable a line of code by clicking in front of the line number. A sleeping emoji\ + \ \U0001F634 will appear and the line will be crossed out.\nThe 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!** ``` From 12333270aa9307229d775a6fe5878124fd9c40c6 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 14 Mar 2024 13:48:08 +0000 Subject: [PATCH 3/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- content/adventures/en.yaml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/content/adventures/en.yaml b/content/adventures/en.yaml index fa9d8c384b2..e8b6b994e7e 100644 --- a/content/adventures/en.yaml +++ b/content/adventures/en.yaml @@ -734,12 +734,7 @@ adventures: description: debugging adventure levels: 1: - story_text: "Welcome to a debugging adventure. Debugging a code means getting rid of mistakes in the code.\nThat means that in these debugging adventures, we will show you code that does not work yet.\nYou will have to figure out what's wrong and correct the mistakes.\n\n### Exercise\n\ - Debug this code. Good luck!\n\n**How to debug a code**\n\nOf course you could just look at the code and find the mistakes yourself, but we also have some tools to help you.\nClick on the ladybug \U0001F41E button beneath your input field. This starts the **debugger**. With the debugger\ - \ you can run a program line-by-line.\nIf 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.\n\nIf the major mistakes are gone, the debugger will\ - \ run your program line by line.\nTo 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.\nTo stop the debugger, click on the \U0001F6D1 button\ - \ in the middle.\nTo start running your code from the top, click the \U0001F501 button on the left.\n\nDid you get stuck on a line of code and do you want to try your program without that line?\nYou can disable a line of code by clicking in front of the line number. A sleeping emoji\ - \ \U0001F634 will appear and the line will be crossed out.\nThe 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. " + story_text: "Welcome to a debugging adventure. Debugging a code means getting rid of mistakes in the code.\nThat means that in these debugging adventures, we will show you code that does not work yet.\nYou will have to figure out what's wrong and correct the mistakes.\n\n### Exercise\nDebug this code. Good luck!\n\n**How to debug a code**\n\nOf course you could just look at the code and find the mistakes yourself, but we also have some tools to help you.\nClick on the ladybug \U0001F41E button beneath your input field. This starts the **debugger**. With the debugger you can run a program line-by-line.\nIf 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.\n\nIf the major mistakes are gone, the debugger will run your program line by line.\nTo 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.\nTo stop the debugger, click on the \U0001F6D1 button in the middle.\nTo start running your code from the top, click the \U0001F501 button on the left.\n\nDid you get stuck on a line of code and do you want to try your program without that line?\nYou can disable a line of code by clicking in front of the line number. A sleeping emoji \U0001F634 will appear and the line will be crossed out.\nThe 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!** ``` From dc34b2e98cc011f79b1ae1fde1ae00f8636616d4 Mon Sep 17 00:00:00 2001 From: MarleenGilsing <80678586+MarleenGilsing@users.noreply.github.com> Date: Thu, 14 Mar 2024 15:05:01 +0100 Subject: [PATCH 4/4] added the link to the video to the text. --- content/adventures/en.yaml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/content/adventures/en.yaml b/content/adventures/en.yaml index e8b6b994e7e..07894cb5c6e 100644 --- a/content/adventures/en.yaml +++ b/content/adventures/en.yaml @@ -734,7 +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.\nThat means that in these debugging adventures, we will show you code that does not work yet.\nYou will have to figure out what's wrong and correct the mistakes.\n\n### Exercise\nDebug this code. Good luck!\n\n**How to debug a code**\n\nOf course you could just look at the code and find the mistakes yourself, but we also have some tools to help you.\nClick on the ladybug \U0001F41E button beneath your input field. This starts the **debugger**. With the debugger you can run a program line-by-line.\nIf 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.\n\nIf the major mistakes are gone, the debugger will run your program line by line.\nTo 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.\nTo stop the debugger, click on the \U0001F6D1 button in the middle.\nTo start running your code from the top, click the \U0001F501 button on the left.\n\nDid you get stuck on a line of code and do you want to try your program without that line?\nYou can disable a line of code by clicking in front of the line number. A sleeping emoji \U0001F634 will appear and the line will be crossed out.\nThe 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. " + story_text: | + ### Exercise + Debug this code. Good luck! + + + **How to debug a code** + + Watch this video 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!** ```