Bird
0
0

When running node --inspect-brk app.js and connecting Chrome DevTools, what is the expected behavior?

medium📝 component behavior Q5 of 15
Node.js - Debugging and Profiling
When running node --inspect-brk app.js and connecting Chrome DevTools, what is the expected behavior?
AThe app runs normally without pausing
BExecution pauses on the first line until you resume in DevTools
CDevTools automatically steps over all breakpoints
DThe debugger fails to connect
Step-by-Step Solution
Solution:
  1. Step 1: Understand --inspect-brk

    This flag starts the inspector and pauses execution on the first line.
  2. Step 2: Behavior on connection

    When DevTools connects, the app remains paused until you manually resume.
  3. Final Answer:

    Execution pauses on the first line until you resume in DevTools -> Option B
  4. Quick Check:

    Does the app wait for user action before continuing? [OK]
Quick Trick: Inspect-brk pauses execution until resumed in DevTools [OK]
Common Mistakes:
  • Assuming the app runs immediately
  • Thinking DevTools auto-continues execution
  • Believing debugger fails to connect

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Node.js Quizzes