记录下vscode debuggger相关的配置便于查找
{
"name": "Attach to Chrome",
"port": 9222,
"request": "attach",
"type": "chrome",
"webRoot": "${workspaceFolder}/packages/xxx/",
},
{
"name": "Launch Chrome",
"request": "launch",
"type": "chrome",
// 入口地址
"url": "http://localhost:4000",
"webRoot": "${workspaceFolder}/packages/xxx/",
"userDataDir": false,
"runtimeExecutable": "/Applications/Google Chrome Beta.app/Contents/MacOS/Google Chrome Beta"
},
attach模式化,需要命令行启动浏览器
使用beta调试,不和默认浏览器冲突,beta下载
/Applications/Google\ Chrome\ Beta.app/Contents/MacOS/Google\ Chrome\ Beta --remote-debugging-port=9222
nodejs attach
{
// 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": "attach",
"name": "Node: Nodemon",
"processId": "${command:PickProcess}",
"restart": true,
"outFiles": [
"!**/node_modules/**"
]
}
]
}