Bird
0
0

Which command correctly starts the Node.js built-in debugger for a script named app.js?

easy📝 Syntax Q12 of 15
Node.js - Debugging and Profiling
Which command correctly starts the Node.js built-in debugger for a script named app.js?
Anode debug app.js
Bnode run app.js
Cnode inspect app.js
Dnode start app.js
Step-by-Step Solution
Solution:
  1. Step 1: Recall debugger start commands

    The modern way to start the Node.js debugger is using node inspect followed by the script name.
  2. Step 2: Check each option

    node inspect app.js uses node inspect app.js, which is correct. node debug app.js uses deprecated node debug. Options B and D are invalid commands.
  3. Final Answer:

    node inspect app.js -> Option C
  4. Quick Check:

    Start debugger = node inspect [OK]
Quick Trick: Use 'node inspect' to start debugger, not 'node debug' [OK]
Common Mistakes:
  • Using 'node debug' which is deprecated
  • Using 'node run' or 'node start' which don't start debugger
  • Confusing command syntax order

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Node.js Quizzes