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