How can you learn when you can't debug?

Now into the “Practice makes perfect” where we’re supposed to take everything we’ve learned and build on an empty codebase.

Problem is, when you run code, all you get is whether it worked or not. There’s no facility to step through and debug.

This is so far away from a real coding environment that learning effectively stops at this point and things get very frustrating.

I’m not sure which language you’re working with, sometimes the CC environment has half-decent errors and for others there’s absolutely nothing to go on. It’s certainly frustrating if you’re used to being given a list of likely errors, their cause and line number or an interactive stepping tool but that doesn’t mean you can’t debug at all.

You’ll find similar guidance elsewhere but making small changes and testing it compiles/runs often can help as can using comments to edit out chunks of code to test what does and does not run. Printing/outputting anything and everything you’re not sure about can also help you pinpoint an issue. I’m sure there’s more such as breaking out the ducks if you search around but I’m sure you get the idea or already know this.

It might slow you down but such simple debugging techniques are something you’ll probably be using from now till the cows come home no matter how good your automated debugging tools are.

A link to the appropriate course material would be delightfully helpful here.

HI there,

One thing I do when I debug in the CC environment is use chrome or firefox dev tools. You can right click, inspect and then view the console, see the code, etc. This is typically where I go to debug if the CC console isn’t throwing errors. Some of the more complex projects, you’ll need to be comfortable doing this. The browser console will give you a lot more information, especially when working with react. I know this project is in Python, not sure if debugging is any different, but thought I’d mention how I debug in any case. Good luck and hope it helps!


Ha ha, sorry, I didn’t realise I’d landed in a more general forum.

This is the Python 2 course. I was a C++ and Java dev in the distant path so understand coding even if I haven’t done it in 20 years!

I find the errors can be quite vague, and the ability to set breakpoints and step through code would be very helpful.

That said, I understand this is a teaching environment not an IDE.