使用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
        },

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM