Is debugging always the solution for code newbies?

Is debugging always the solution for code newbies?

Situations when you shouldn't debug

As a newbie developer there are times when it is more reasonable to restart a project from scratch than debugging indefinitely. It is common for newbie developers to get stuck when following tutorial videos or reading books and coding alongside. It is so easy to make mistakes (and not notice them) when coding.

The skill of debugging isn't something you immediately get as a developer, error messages as well as the code you're writing itself looks very confusing at first, it's hard to debug at this stage until you understand the code and error messages don't confuse you. Starting a project over is advised because the frustration of peering at your code for hours without being able to spot your errors can crush the spirits of most developers.

This is also a gentle reminder that you need to ensure that the code version in the learning resource you're using and the version of your actual code are the same. For example, learning from a .Net3.1 tutorial while writing that same code in .Net 5 coding environment isn't advised because some of the things in 3.1 may not give the same result in 5.0 (this is a strictly figurative example, Microsoft technologies has arguably the most consistent backward compatibility you can find). You should ensure your coding environment matches what is being used in the learning resource you're making use of.