# Practice with the Debugger in MakeCode Arcade

**URL:** <https://forum.makecode.com/t/practice-with-the-debugger-in-makecode-arcade/41833>\
**Category:** Help\
**Created:** [February 1, 2026, 8:21pm UTC](https://forum.makecode.com/t/practice-with-the-debugger-in-makecode-arcade/41833 "2026-02-01T20:21:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexK](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alexk/32/33339_2.png) [@AlexK](https://forum.makecode.com/u/AlexK)\
**Post date:** [February 1, 2026, 8:21pm UTC](https://forum.makecode.com/t/practice-with-the-debugger-in-makecode-arcade/41833/1 "2026-02-01T20:21:02Z")

</div>

WoofWoof gave me a great idea a few months ago, and I’ve been thinking about it over the weekend.

He said that we should have a tutorial on using the built-in debugger in MakeCode.

So, here it is!

This won’t be a tutorial like those that you see on the MakeCode home page, because you cannot activate the debugger from inside of the tutorial tool.

Instead, you will follow along with instructions here. You’ll need to open MakeCode in a separate window – preferably on a different screen. After learning about the built-in debugger, you will have a series of exercises that you can try to debug on your own.

The instructions should work for any of the MakeCode editors. The exercises, though, will be for MakeCode Arcade.

Let’s begin!

# Using the built-in debugging tool

Let’s use a simple project to learn about the debugger. Open one of the projects below in a new window or on a separate device.

> **MakeCode Arcade**
>
> ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/1/5/153926d7115509a063bad2cb9edbfce061a663e3.png)  
> [https://makecode.com/\_bKa5V30qYCrV](https://makecode.com/_bKa5V30qYCrV)

> **MakeCode for micro:bit**
>
> ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/8/b/8bae46954354b3e536f217e57ff9a83a7bcf6293.png)  
> [https://makecode.microbit.org/\_FPcAUPe85Fh4](https://makecode.microbit.org/_FPcAUPe85Fh4)

 ![MakeCode Arcade in Debug Mode. The button in the simulator toolbar to enter Debug Mode is highlighted. It is the third button from the left.](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/4/4/448fdf303723062b9ea419933cf1beb0bdc119cc.png)

The button for entering **Debug Mode** is beneath the simulator with an image of a bug. It is highlighted in the screenshow above.

Play around with debug mode using the steps below.

> **Playing with debug mode**
>
> 1. Switch MakeCode into Debug Mode by pressing the button with the bug icon in the simulator toolbar.
> 2. When MakeCode is in Debug Mode, you cannot edit your code, so the toolbox is replaced with the Debug Mode controls and the variables list.
> - The **→ Step** button runs the current block and then highlights the next one to run. This is called _stepping_ through your code.
> - The **play/pause** button runs your code when the **play** (triangle) button is showing. MakeCode will stop at the next breakpoint (the red dots that appear on the left side of your blocks in Debug Mode) or when you select the **pause** button.
> - The **restart** button runs your program from the beginning.
> - The **slo-mo** button switches the playback speed between full speed and slow speed. When Debug Mode is running your program in slo-mo, you can watch the highlight and the variables list update as your code runs.
> 
> 3. When you enter Debug Mode, your program is restarted and then paused. Notice the yellow highlight around the first block in the **on start** container. This is the next block that Debug Mode will run.
> 4. Select the **→ Step** button in the Debug Mode controls. Debug Mode runs the first block, updates the variables list, and then moves the highlight to the next block that will run.
> 5. Select the **restart** button in the Debug Mode controls. Then, select the **play** button. Notice how quickly your program runs.
> 6. Enable slo-mo mode and then restart your program again. Notice that your program runs much more slowly now.
> 7. Enable the breakpoint on the **if** block by selecting the small circle next to the word _if_. Notice that the circle turns red, indicating that the breakpoint is enabled. Disable slo-mo mode and then restart your program. Notice that your program restarts, and then Debug Mode automatically pauses on the if block. If you enable multiple breakpoints, then Debug Mode will pause at any that it encounters. You can disable a breakpoint by selecting the breakpoint circle again.
> 8. Use the button in the top-right corner to exit Debug Mode.

Debug Mode helps you to visualize what the computer is doing as it runs your code. Explore MakeCode’s Debug Mode on your own.

When you are ready, try this activity with the sample project:

> **Debugging activity**
>
> 1. Place MakeCode in Debug Mode if it is not already.
> 2. Clear any breakpoints that you have set and then enable the breakpoint on the _if_ block.
> 3. Restart the project and then select the play button to run the code. Debug Mode will run the first block and then it will pause at the if block.
> 4. Review the variables list. Which block will run next?
> 5. Select the → Step button to see if you were correct.
> 6. Play the game a few times. See if you can correctly predict each time.

# Debugging exercises

Now that you have learned a little bit about Debug Mode in MakeCode, you can try debugging code on your own. Time to squash some bugs in MakeCode Arcade! **Note** : Some of these are _really_ tough!

Answers are provided at the end. If you have any questions, feel free to post them below.

Do you have any debugging exercises that you would like to share? Or ideas for other debugging exercises? Feel free to post those, too!

> **Exercise 1**
>
> A friend shares their project with you seeking help. MakeCode Arcade generates an error, and the simulator does not run the project. Can you help?
> 
> [https://makecode.com/\_X96cF0cU44eX](https://makecode.com/_X96cF0cU44eX)

> **Exercise 2**
>
> A friend shows you the project that they are working on. The player’s sprite moves around the screen just fine, but why is there an extra sprite on the screen?
> 
> Your friend wanted the player to be a cat at first, but then changed their mind and wants the player to be a fish instead.
> 
> Also, the player can move their sprite off the screen, and your friend does not want that. Can you fix this?
> 
> [https://makecode.com/\_2U65LiKVx6KV](https://makecode.com/_2U65LiKVx6KV)

> **Exercise 3**
>
> A friend was playing with some of the sprite blocks, but now their project is broken and is generating a strange error. Can you help?
> 
> [https://makecode.com/\_i3ma9fP7d59R](https://makecode.com/_i3ma9fP7d59R)

> **Exercise 4**
>
> A friend shows you the project that they have just started. The player can move their sprite around the screen, but something strange happens when the duck touches food.
> 
> Can you explain what is happening, and can you fix the code?
> 
> [https://makecode.com/\_TTpA3MgLwazw](https://makecode.com/_TTpA3MgLwazw)

> **Exercise 5**
>
> One of your friends is trying to get their game, _Guess My Number_, to work. They inserted some blocks to deal with data validation because they heard that you always should validate user input. Their code isn’t quite working correctly. Can you help?
> 
> [https://makecode.com/\_WdhXqwdctFhf](https://makecode.com/_WdhXqwdctFhf)

> **Exercise 6**
>
> Your friend shows you a game that has different sizes of coins that the hero is collecting. The coins appear randomly … somewhat. Only the large coins seem to be distributed randomly. The other coins don’t really seem to be appearing.
> 
> A coin should disappear once the player picks it up.
> 
> Your friend also wants to assign different values to the different coin sizes.
> 
> Can you help them accomplish what they are seeking?
> 
> [https://makecode.com/\_eMc2aWRg17gj](https://makecode.com/_eMc2aWRg17gj)

> **Exercise 7**
>
> One of your friends is trying to understand their code. It works … but they do not really understand why. What they really want is a row of asteroids … but right now, they have something different. Can you explain their own code to them? Can you fix the code to show a row of asteroids instead?
> 
> [https://makecode.com/\_dWvFVrHg7Rpz](https://makecode.com/_dWvFVrHg7Rpz)

> **Exercise 8**
>
> Another friend is working on arranging a series or enemies. They want a grid of asteroids, four by four. Right now, they have a diagonal line of asteroids … sorta? Can you help?
> 
> [https://makecode.com/\_FVeWmX0MzDRL](https://makecode.com/_FVeWmX0MzDRL)

> **Exercise 9**
>
> One of your students has taken a programming course in the past. They want to place sprites in a row. They know that they can do this with a `for` loop. For example, in a BASIC-like language, you would write something like this:
> 
> ```basic
> For xCoord = 10 to 150 step 100
> create enemy sprite
> set sprite’s x coordinate to xCoord
> Next xCoord
> 
> ```
> 
> In a C-based language, you might write something like this:
> 
> ```c
> for (xCoord = 10; x <= 150; x += 10) {
> create enemy sprite;
> set sprite’s x coordinate to xCoord;
> }
> 
> ```
> 
> Your student also recalls something about writing any `for` loop as a `while` loop. Right now, the simulator does not seem to do anything … at all. (If you let the simulator run long enough, then it eventually will encounter an out-of-memory error.) Can you fix this code?
> 
> [https://makecode.com/\_VdiTyaLjWM5p](https://makecode.com/_VdiTyaLjWM5p)

> **Exercise 10**
>
> Your friend shows you a project where the player is trying to capture stars. The stars all originate at the center of the screen, which is fine … but they always move to the bottom-right. That does not seem … “random” enough. Also, your friend wants the stars to stay on the screen, and maybe change direction when they hit the side of the screen. How can you help?
> 
> [https://makecode.com/\_0Frb3v4cXWkt](https://makecode.com/_0Frb3v4cXWkt)

> **Exercise 11**
>
> It’s _Rock, Paper, Scissors_, but it’s broken! Can you fix it? Review the comments throughout the program to help you understand it.[1]
> 
> [https://makecode.com/\_3fcaMfTMuJki](https://makecode.com/_3fcaMfTMuJki)

> **Exercise 12**
>
> A friend created a program for their younger siblings to help with their addition facts. It has some bugs, though. Can you help?[1][2]
> 
> [https://makecode.com/\_9Ctfcphf5ess](https://makecode.com/_9Ctfcphf5ess)

> **Footnotes**
>
> [1] From Usborne’s _Practice Your BASIC_. Usborne provides several of their programming books from the 1980s in PDF format at their website:
> 
> [https://usborne.com/us/books/computer-and-coding-books](https://usborne.com/us/books/computer-and-coding-books)
> 
> [2] This project uses the **Text Sprite** extension. Search the forum if you haven’t used this extension before!

> **Answers**
>
> - **Exercise 1** [https://makecode.com/\_aaXfqCJ0KX7f](https://makecode.com/_aaXfqCJ0KX7f)
> - **Exercise 2** [https://makecode.com/\_UqR0k0YhsLoo](https://makecode.com/_UqR0k0YhsLoo)
> - **Exercise 3** [https://makecode.com/\_huEFjbLMb76e](https://makecode.com/_huEFjbLMb76e)
> - **Exercise 4** [https://makecode.com/\_iY30KXicT2FL](https://makecode.com/_iY30KXicT2FL)
> - **Exercise 5** [https://makecode.com/\_HMMhP8azUEs4](https://makecode.com/_HMMhP8azUEs4)
> - **Exercise 6** [https://makecode.com/\_MA3d795z9CY1](https://makecode.com/_MA3d795z9CY1)
> - **Exercise 7** [https://makecode.com/\_9osPa57prTwx](https://makecode.com/_9osPa57prTwx)
> - **Exercise 8** [https://makecode.com/\_PdAY94M962vw](https://makecode.com/_PdAY94M962vw)
> - **Exercise 9** [https://makecode.com/\_X8jDCX3hqKRa](https://makecode.com/_X8jDCX3hqKRa)
> - **Exercise 10** [https://makecode.com/\_hw36370bC46j](https://makecode.com/_hw36370bC46j)
> - **Exercise 11** [https://makecode.com/\_8yJiY8fxrgUK](https://makecode.com/_8yJiY8fxrgUK)
> - **Exercise 12** [https://makecode.com/\_VE4atPYW9i0d](https://makecode.com/_VE4atPYW9i0d)

---

<div class="post-metadata">

**Author:** ![redSprite](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/redsprite/32/34262_2.png) [@redSprite](https://forum.makecode.com/u/redSprite)\
**Post date:** [February 1, 2026, 10:07pm UTC](https://forum.makecode.com/t/practice-with-the-debugger-in-makecode-arcade/41833/2 "2026-02-01T22:07:41Z")

</div>

You know, you can also do a footnote like this: \[1\]

```auto
^[Hello World!]

```

Other than that good tutorial! Helps introduce people into what MOST of your programming time goes into.

* * *

1. Hello World!

---

<div class="post-metadata">

**Author:** ![Rune](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/rune/32/18951_2.png) [@Rune](https://forum.makecode.com/u/Rune)\
**Post date:** [February 2, 2026, 6:23pm UTC](https://forum.makecode.com/t/practice-with-the-debugger-in-makecode-arcade/41833/3 "2026-02-02T18:23:09Z")

</div>

OMG this is great! I had used the debug tool before, but didn’t know about the breaking circles. The exercises seem like good practice, Im going to try them when I have the time.
