1.按照这篇文章配置好环境:https://www.jianshu.com/p/dfa9595d74bf
2.按照这篇文章调试安装需要的依赖:https://blog.csdn.net/jxbinwd/article/details/83651547
.babelrc 文件内容:
{
"presets": [
"es2015"
],
"sourceMaps": true,
"retainLines": true
}
修改launch.json内容
打开vscode菜单: “调试”--“打开配置”。
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "启动程序",
"program": "${workspaceFolder}\\bin\\www",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/babel-node" (特别重要)
}
]
}
参考地址:
https://www.jianshu.com/p/dfa9595d74bf
https://blog.csdn.net/jxbinwd/article/details/83651547
https://www.jianshu.com/p/959aa9814345
想要看官网的小伙伴,点击这里:https://code.visualstudio.com/docs/editor/debugging
网友评论