Bird
0
0

Which of the following is the correct way to start debugging a Node.js file named app.js in VS Code using the Run and Debug panel?

easy📝 Syntax Q3 of 15
Node.js - Debugging and Profiling
Which of the following is the correct way to start debugging a Node.js file named app.js in VS Code using the Run and Debug panel?
AClick the green play button and select 'Node.js' then specify <code>app.js</code> as the program
BOpen Terminal and type <code>node debug app.js</code>
CRight-click <code>app.js</code> and select 'Run Without Debugging'
DUse the Git panel to start debugging
Step-by-Step Solution
Solution:
  1. Step 1: Understand VS Code debugging start process

    In the Run and Debug panel, clicking the green play button and choosing 'Node.js' lets you specify the file to debug, such as app.js.
  2. Step 2: Review other options

    Typing 'node debug app.js' is a command line method, not VS Code UI. 'Run Without Debugging' does not start debugger. Git panel is unrelated.
  3. Final Answer:

    Click the green play button and select 'Node.js' then specify app.js as the program -> Option A
  4. Quick Check:

    Start debugging via Run and Debug panel = Click the green play button and select 'Node.js' then specify app.js as the program [OK]
Quick Trick: Use Run and Debug panel's green play for Node.js debugging [OK]
Common Mistakes:
  • Confusing run without debugging with debugging
  • Using Git panel for debugging
  • Trying command line instead of VS Code UI

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Node.js Quizzes