Bird
0
0

Which of the following is the correct syntax to start the Node.js debugger from the command line?

easy📝 Syntax Q3 of 15
Node.js - Debugging and Profiling
Which of the following is the correct syntax to start the Node.js debugger from the command line?
Anode run yourfile.js
Bnode debug yourfile.js
Cnode --inspect yourfile.js
Dnode start yourfile.js
Step-by-Step Solution
Solution:
  1. Step 1: Recall Node.js debugger start commands

    The modern way to start debugging is using 'node --inspect filename.js' to enable debugging.
  2. Step 2: Check other options

    'node debug' is deprecated, 'node run' and 'node start' are invalid commands.
  3. Final Answer:

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

    Debugger start syntax = node --inspect [OK]
Quick Trick: Use 'node --inspect' to start debugger [OK]
Common Mistakes:
  • Using deprecated 'node debug' command
  • Trying 'node run' which is invalid
  • Confusing 'node start' with debugger

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Node.js Quizzes