https://where.matsinet.codes/presentations/step-debugging-js
This is ok simple application logic
Advanced logic === more console.log statements
console.log output statements then become overwhelming
As complexity grows console becomes too verbose:
console.log('function begin', variable);
console.log('function end', variable);
console.group();
console.log('another function begin', variable);
console.log('another function end', variable);
// Numerous other console.log calls
console.groupEnd();
...is an interactive connection between the IDE and browser allowing the IDE to control the JavaScript execution within the browser.
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}"
}
]
}
By default, the launch configuration is stored in project
in the .vscode folder
The launch configuration can be stored across projects (globally) in the settings.json under the "launch" key.
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome w/Parcel",
"url": "http://localhost:1234",
"webRoot": "${workspaceFolder}",
"trace": true,
"breakOnLoad": true,
"sourceMapPathOverrides": {
"*": "${webroot}/src/*"
}
}
Sample code, instructions and configuration
https://github.com/matsinet/step-debugger-walk-through
Slides: https://where.matsinet.codes/presentations/step-debugging-js