This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
How do you run Node.js with inspect mode enabled?
With the command node inspect myscript.js
node inspect myscript.js
With the command node --inspect myscript.js
node --inspect myscript.js
With the command `node myscript.js
By entering debug in the Node.js REPL
debug
How can you make a debugger pause the execution of your program on a specific line of code?
With the command node --inspect-brk myscript.js
node --inspect-brk myscript.js
By stepping through your code until you reach the wanted line
By commenting out unwanted code
By setting a breakpoint in your code
What's the preferred way to print information in the console during debugging?
With a breakpoint
By adding a console.log() call in my code
console.log()
With a logpoint
By watching a variable
You must answer all questions before checking your work.
Was this page helpful?