1 2 3 4

使用vscode打断点

1.vscode打开的文件必须只包含你要调适的项目,不能同时在一个vscode打开多个项目窗口

2.点击vscode的这个小蜘蛛

 

 

 3.选择添加配置

 

4.此时自动生成了一个文件,launch.json:

 

 

 你设置name并修改路径。保存。

5.此时,按F5就可以调试了。特别有利于node找bug。

 

 

6.如果配置如下:就可以整个项目调试。

 {
            "type": "node",
            "request": "launch",
            "name": "Egg Test",
            "runtimeExecutable": "npm",
            "runtimeArgs": [
                "run",
                "test-local",
                "--",
                "--inspect-brk"
            ],
            "protocol": "auto",
            "port": 9229,
            "autoAttachChildProcesses": true
        },

 

posted @ 2019-11-18 18:35  红鲤鱼与LV  阅读(13899)  评论(0编辑  收藏  举报