vscode調試vue node

1.vscode 調試vue項目

引用文字

launch.json

{
      "type": "chrome",
      "request": "launch",
      "name": "Launch Chrome against localhost",
      "url": "http://localhost:8090",
      "webRoot": "${workspaceFolder}/src",
      "sourceMaps": true,
      "sourceMapPathOverrides": {
        "webpack:///./*": "${webRoot}/*",
        "webpack:///src/*": "${webRoot}/*",
        "webpack:///*": "*",
        "webpack:///./~/*": "${webRoot}/node_modules/*",
        "meteor://💻app/*": "${webRoot}/*"
      }
    }

vue.config.js

clipboard.png



vscode 調試node項目

launch.json

  • 直接F5 或者Fn + F5 運行便可進行調試
{
      "type": "node",
     "request": "launch",
      "name": "Launch Program",
      "program": "${workspaceFolder}/bin/www",  // window 路徑須要\\
      "runtimeExecutable": "nodemon",   // 須要安裝nodemon 全局安裝
      "restart": true,
      "console": "integratedTerminal",
      "skipFiles": [
        "${workspaceRoot}/node_modules/**/*.js",
      "<node_internals>/**/*.js"
      ]
    }
相關文章
相關標籤/搜索