Complete the code to start debugging by setting a breakpoint in VS Code.
console.log('Hello, world!'); // Set a [1] here to pause execution
A breakpoint is a marker in VS Code where the program pauses during debugging.
Complete the launch configuration to debug a Node.js app in VS Code.
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/[1]"
}The program field points to the main JavaScript file to run, usually index.js.
Fix the error in the debug console command to inspect variable 'count'.
Debug console command: [1] countIn VS Code debug console, use evaluate or just type the variable name to see its value.
Fill both blanks to set a conditional breakpoint that pauses when 'x' is greater than 10.
// Set conditional breakpoint: right-click on breakpoint and enter condition: x [1] [2]
Conditional breakpoints pause only when the condition is true, here when x > 10.
Fill both blanks to create a watch expression that shows the length of array 'items'.
Watch expression: [1]..[2]
The length of an array is accessed by items.length. The middle blank is empty to represent no extra token.