Bird
0
0

What happens if you run node inspect app.js and the script has no breakpoints or debugger statements?

medium📝 Predict Output Q5 of 15
Node.js - Debugging and Profiling
What happens if you run node inspect app.js and the script has no breakpoints or debugger statements?
ADebugger starts and pauses at first line
BScript runs normally without pausing
CDebugger throws an error
DDebugger waits for manual breakpoint
Step-by-Step Solution
Solution:
  1. Step 1: Understand default debugger behavior

    When started with node inspect, debugger pauses at the first line even without breakpoints.
  2. Step 2: Evaluate other options

    Script does not run immediately, no error occurs, debugger does not wait silently.
  3. Final Answer:

    Debugger starts and pauses at first line -> Option A
  4. Quick Check:

    Debugger pause on start = true [OK]
Quick Trick: Debugger pauses on first line by default [OK]
Common Mistakes:
  • Expecting script to run without pause
  • Thinking debugger throws error
  • Assuming manual breakpoint needed first

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Node.js Quizzes