Spending most of the time debugging

Whenever I work on a new project or just write some blocks of code, I seem to spend more time debugging than writing new codes. Is this normal?

Yes.

Yup, that is programming in a nutshell. The more you progress, the less you will catch yourself just sitting down and writing a tone of code without any error or debugging.

Debugging, consulting documentation, discussing with other fellow coders, that what it is about. At least from my perspective.

Debugging is our daily bread.