markdown [node debug]节点es6 #vscode #node #debug的调试设置
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown [node debug]节点es6 #vscode #node #debug的调试设置相关的知识,希望对你有一定的参考价值。
### Node ES6 debug setup:
```json
// launch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug Es6",
"cwd": "${workspaceFolder}",
"sourceMaps": true,
"preLaunchTask": "npm: build",
"program": "${workspaceFolder}/dist/index",
"stopOnEntry": false,
"localRoot": "${workspaceFolder}",
"remoteRoot": "${workspaceFolder}",
"outFiles": ["${workspaceFolder}/dist/**"],
"skipFiles": ["${workspaceFolder}/node_modules/**/*.js"]
}
]
}
```
```json
// package.json
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "nodemon src/index.js --exec babel-node ",
"build": "rm -rf dist/ && npm run build:src",
"build:src": "babel src/ --out-dir=dist --source-maps",
"watch": "npm run build:src --watch"
},
```
```json
// .babelrc
{
"presets": ["env", "stage-0"],
"plugins": ["transform-runtime"]
}
```
以上是关于markdown [node debug]节点es6 #vscode #node #debug的调试设置的主要内容,如果未能解决你的问题,请参考以下文章
markdown Node.js中的自定义ES6错误
以“node --debug-brk”启动时,节点不会在第一行中断
es.nodes.wan.only: false
markdown 节点#node
markdown 节点10 node-gyp问题
Elasticsearches node 节点