JavaScript Basic Debugging in Browser DevTools Quiz
Understand 30 questions covering how to open DevTools, inspect the DOM, use the console, set and manage breakpoints, step through code, inspect the call stack, monitor network calls, leverage overrides, analyze performance and memory, debug event listeners, and work in responsive design mode.
Question 1
Which shortcut typically opens DevTools on Windows/Linux?
Question 2
What does the Elements panel allow you to do?
Question 3
How can you select an element directly from the page for inspection?
Question 4
Which tool helps you toggle CSS properties without editing source files?
Question 5
When debugging layout issues, why is the Box Model section useful?
Question 6
Which panel evaluates JavaScript expressions and displays log output?
Question 7
What benefit does the Console provide during debugging?
Question 8
Which panel allows you to set JavaScript breakpoints and step through code?
Question 9
What happens when you click a line number in the Sources panel?
Question 10
Why is pretty-printing useful in DevTools?
Question 11
What type of breakpoint is shown?
// In Sources panel
if (user.isAdmin) {
// breakpoint set on next line
loadDashboard()
}Question 12
What does a conditional breakpoint allow you to do?
Question 13
How do you set a conditional breakpoint?
// Right-click a line number
// Enter condition: order.total > 100Question 14
What does Step Over do in the debugger?
Question 15
What does Step Into accomplish?
function a() { b() }
function b() { console.log('b') }
a() // pause on this line and Step IntoQuestion 16
If you need to resume execution until the current function returns, which control do you use?
Question 17
What is the impact of enabling "Pause on caught exceptions"?
Question 18
What information does the Call Stack panel provide during a pause?
Question 19
What does evaluating watch expressions allow you to do?
Question 20
What do the red entries in the Network panel typically indicate?
Question 21
How can you monitor fetch calls automatically?
// In Sources > XHR/fetch breakpoints
// Add breakpoint for URL containing "api"Question 22
What does the code below demonstrate?
// Event Listener Breakpoints
// Mouse > click checked
// Clicking the page pauses executionQuestion 23
Why might you use Local Overrides in DevTools?
Question 24
What does this throttling setting accomplish?
// Network panel
// Throttle dropdown -> Slow 3GQuestion 25
How can the Network panel help debug failed API calls?
Question 26
What do the Timeline bars in the Network panel indicate?
Question 27
How can you filter Network entries to view only XHR/fetch requests?
// Network panel
// Click the XHR filter button or type "-resource-type:other"Question 28
What does the following screenshot scenario represent?
// Network table
// A fetch request returning 304 Not ModifiedQuestion 29
How do you inspect the initiator of a request in Network panel?
Question 30
Why use responsive design mode in DevTools?
