JavaScript - Debugging and Testing

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/8

encourage image

There's no tags or description

Looks like no tags are added yet.

9 Terms

1
New cards

Why Debugging and Testing Matters

●Testing and Debugging are important processes in software engineering.


●Testing is the process of identifying defects or errors in the software system


●Debugging is the process to to fix those defects or errors that affect the working of software.


2
New cards

What is Debugging

●Debugging is the process of fixing a bug in the software. It can be defined as identifying, analyzing, and removing errors.


●The purpose of debugging is to fix those defects or errors.


●Debugging is done after testing


●Debugging is done only by insiders. An outsider can't do debugging.

3
New cards

●is used to print output

console.log()


4
New cards

●is used to highlight errors

console.error()


5
New cards

●is used to highlight warnings

console.warn()


6
New cards

●is used to display arrays and objects nicely

console.table()


7
New cards

Breakpoints

●Breakpoints are essential tools in debugging that let you pause code execution at specific points to inspect what's going on.


●Setting breakpoints allow you to manipulate code for controlled scenarios


●Breakpoints are crucial for digging into complex programs and pinpointing exactly where and why errors occur.


8
New cards

Debugging Techniques

●Using console logging helps with debugging for specific values or objects


●The try...catch statement is comprised of a try block and either a catch block, a finally block, or both.


●The code in the try block is executed first, and if it throws an exception, the code in the catch block will be executed. The code in the finally block will always be executed before control flow exits the entire construct.


9
New cards

What is Testing

●Testing is the process of verifying and validating that a software or application

○Bug-free

○Meets the technical requirements

○Meets the user requirements effectively and efficiently


●The purpose of testing is to identify defects or errors in the software system


●Testing is done before debugging


●Testing can be done by insiders as well as outsiders.