Class Ten Notes (201)
Debugging
Troubleshooting
- Syntax error is an error resulted from typos, while logic error is an error is when the code executes differently than intended
- I have encountered both syntax and logic erros in the past. Usually I forgot to close my functions or loops, or I close them in the wrong spot without realizing. I am usually able to fix unclosesd functions or loops by reading the error message from the console in the browser, but the logic error (such as return results or encolse the function/loop at the wrong spot) would require me to reason out the code and pay attention to where the closing brace was.
- This topic will help me to debug my code more efficiently, since erros are inevitable, and I want to be able to fix my errors without spending hours on it.
JavaScript Debugger
- The JavaScript Debugger tool is something that allows you to break your code in chunks and find what the chunk of code does, and if there’s an error, what is causing the error within the chunk
- A breakpoint is where you want the debugger to stop running the code
- A callstack is the chunk code to be run by the debugger
Things I want to know more about
- How to use HTML and CSS in the debugger tool? Since HTML does not give me an error, it’s usually difficult to troubleshoot.
Back to main page
References