VSCode & Node.js & debugger & inspector
VSCode & Node.js & debugger & inspector
F5
ws 元信息 (UUID)
ws://127.0.0.1:46912/efa91bda-1ffc-4bd1-a80a-6f5f3b25c4f9
https://nodejs.org/en/docs/guides/debugging-getting-started/
chrome-devtools
chrome-devtools://devtools/bundled/js_app.html?experiments=true&v8only=true&ws=127.0.0.1:23107/f823a6fb-04ee-47c6-9980-8f86bfdd575e
.vscode/launch.json
https://go.microsoft.com/fwlink/?linkid=830387
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}/000-xyz/vscode-debug-node/index.js"
}
]
}
Chrome Devtools
node --inspect app.js
https://github.com/xgqfrms/Node.js/issues/7
node --inspect app.js 激活
Debugger attached
.vscode/settings.json
{
"editor.fontSize": 16,
"editor.renderWhitespace": "all",
"path-intellisense.mappings": {
"@": "${workspaceRoot}/src/operate-tool/src"
},
"editor.tabSize": 2,
// 激活 node inspect debugger
"debug.node.autoAttach": "on",
}
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/12285723.html
未经授权禁止转载,违者必究!