CodeBug Blog

News and stories from The CodeBug Team

Debugging with CodeBug

CodeBug now has a new debugging tool, breakpoints! But what is debugging and what on earth are breakpoints?!

Debugging CodeBug graphic

When you create large complex programs, they are bound to contain errors that make the program behave strangely. These errors are called ‘bugs’, finding and fixing them is called ‘debugging’. Bugs can occur for all sorts of reasons, including typos and misunderstanding how the program is going to work. Debugging is an important skill when creating programs to make them work and to make them reliable.

Debugging can be difficult when you can’t see what your program is doing at a particular point (you are unlikely to be able to click pause just at the right time), this is where breakpoints are useful. A breakpoint tells the program to pause at a particular place in your code. You can then see whether the CodeBug emulator is currently doing what you think it should be.

Don’t forget you can “single step” your programs too by clicking the to show what your program is doing one block at a time. CodeBug emulator step button

Using CodeBug’s new debugging feature is simple, right click on a block and click ‘set breakpoint, or select a block and then click the debug button. Debug button

For more information follow this activity to find out how.

Back to top