reading-notes

Debugging

What Went Wrong? Troubleshooting JavaScript.

Name some key differences between a Syntax Error and a Logic Error.

Syntax errors refer to mistakes in the syntax of a programming language. They occur when the code violates the rules of the programming language, and the compiler or interpreter is unable to parse or understand the code. Some common examples of syntax errors include missing semicolons, mismatched brackets, and misspelled variable names.

Logic errors are errors that occur when the program runs, but does not produce the expected output. These errors occur when there is a flaw in the design or implementation of the program’s logic, and can be harder to identify and fix than syntax errors. Logic errors can cause the program to behave in unexpected ways or produce incorrect results.

List a few types of errors that you have encountered in past lab assignments and explain how you were able to correct them.

  1. Opening and closing tags are something I frequently have issues with.

  2. Mistakes with correctly linking <a> tags, and realizing once getting to the browser.

How will this topic continue to influence your long term goals?

I will be aware of syntax and logical issues when writing code.

The JavaScript Debugger.

How would you describe the JavaScript Debugger tool and how it works to someone just starting out in software development?

The JavaScript Debugger is a powerful tool used by developers to debug JavaScript code running in a web browser or Node.js environment. It allows developers to set breakpoints, step through code, and inspect variables and objects, providing a detailed view of how the code is executing and where any errors or issues might be occurring

Define what a breakpoint is.

Breakpoints are a useful tool for debugging complex programs and can save developers a significant amount of time and effort in identifying and fixing bugs. They are commonly used in programming languages like C++, Java, and Python.

What is the call stack?

The call stack, also known as the execution stack, is a data structure used by a computer program to keep track of the functions or subroutines that have been called, but have not yet completed execution.

Sources

Things I want to know more about