text
F9Launch configurations, breakpoints, tasks.json, and common debugging workflows in VS Code.
F9F10F11Shift+F11F5{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Node: Current File",
"program": "${file}"
}
]
}Attach debugger to a process already running with inspect.
{
"type": "node",
"request": "attach",
"name": "Attach 9229",
"port": 9229
}Inject environment variables into debug sessions.
{
"type": "node",
"request": "launch",
"name": "Debug with env",
"program": "${workspaceFolder}/src/index.js",
"env": {
"NODE_ENV": "development",
"LOG_LEVEL": "debug"
}
}{
"version": "2.0.0",
"tasks": [
{
"label": "npm: build",
"type": "shell",
"command": "npm run build",
"group": "build"
}
]
}{
"label": "npm: dev",
"type": "shell",
"command": "npm run dev",
"isBackground": true,
"problemMatcher": []
}Windows/Linux: Ctrl+Shift+B
macOS: Cmd+Shift+B