Manual Testing & Debugging

JavaScript·2 min read·Jan 14, 2026

In programming, an error is an unexpected situation where the code cannot continue normally, either because the instructions are invalid or because something goes wrong while running.

Some of these errors can cause the program to produce incorrect results, while others can cause it to crash.

In JavaScript, errors fall into 3 categories:

  • Logical errors occur when the program doesn't produce the expected result or behavior, and are a direct consequence of faulty logic implementation made by the developer.
  • Syntax errors, also called parsing errors, occur at interpret time and are related to faulty syntax, such as a missing closing brace } when using an if statement, for instance.
  • Runtime errors, also called exceptions, occur during execution and are usually related to invalid user input, network connection failure, division by non numerical values, and so on.

In this lesson, you will learn how to manually test your code's logic, debug its execution, and interpret Node.js errors.

Recognize crash vs wrong output

When running a script, there are two main outcomes when something is wrong:

  • The script crashes → most likely a syntax error or a runtime error.
  • The script runs but the output is wrong → most likely a logical error.

This distinction matters because you don’t debug these problems the same way.

Read Node.js error reports

In Node.js, when a program encounters a syntax error or a runtime error, it immediately terminates its execution and the error is written to the standard error stream of the terminal.

For example, when running this script:

Unlock the program 🚀

Pay once, own it forever.

€79

30-day money-back guarantee

  • 13 modules
  • 113 lessons with full-code examples
  • 29 projects with commented solutions
  • All future lesson and project updates
  • Lifetime access

By submitting this form, you agree to the Terms & Conditions and Privacy Policy.