神奇的 vscode debug
2017-01-12 本文已影响0人
Yvette14
以node.js
为例

点击左边的侧栏的小虫

点击齿轮、选择Node.js v6.3

将将!!配置文件,
program
那一行是文件的配置,workspaceRoot
默认是你打开的文件的根目录,index.js
就是你要调试的文件
想要改变环境可以加一个配置
比如我需要在test
环境下debug
"env":
{
"NODE_ENV": "test"
}
然后你就可以debug
代码了~
这种方法比在代码里console.log
好太多了,节省很多时间呢!感动哭。