【问题标题】:issues debugging polymer straight from IDE/edit tool直接从 IDE/编辑工具调试聚合物问题
【发布时间】:2018-05-07 09:56:01
【问题描述】:

我对 Polymer 很陌生,我希望能够直接从一个 IDE 调试项目。我的意思是,我宁愿使用 Visual Studio Code 或 Sublime 或 Atom 或其他工具进行调试,而不是使用 Chrome 调试器(请注意,对这个问题没有兴趣比较可用的 IDE。我只是想通过某种方式从任何 IDE 进行调试)。

到目前为止,我读过的所有主题都没有驱车到任何可以帮助我的真正教程。我发现唯一一个我无法让它运行。

我关注了https://medium.com/collaborne-engineering/debug-polymer-tests-with-vs-code-7646d66d0608,当我尝试运行 WCT 时,我得到属性“程序”不存在。

我的 launch.json 是

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "Run wct",
      "program": "${workspaceFolder}\\my-company-component.html",
      "args": [
        "-p",
        "--skip-plugin", "local",
        "--plugin", "none",
        "--webserver-port", "2000",
        "--expanded",
        "--simpleOutput", "${workspaceFolder}"
      ]
    },
    {
      "type": "chrome",
      "request": "launch",
      "name": "Run chrome for wct",
      "url": "http://localhost:2000/components/my-company-component/generated-index.html",
      "webRoot": "${workspaceRoot}",
      "userDataDir": "${workspaceRoot}/.vscode/chrome"
    }
  ]
}

今天,我一直在使用 gulp 启动本地服务器,然后使用 Chrome 进行调试,但如果可以使用 IDE + 一些我更喜欢的扩展程序/插件。

【问题讨论】:

    标签: visual-studio-code polymer sublimetext3 atom-editor


    【解决方案1】:

    如果您使用 -g 安装程序,则程序应该是 'wct' 或
    “${workspaceRoot}/node_modules/.bin/wct” 如果您使用 npm 在本地安装它。 那应该可以解决您的错误,尽管我还没有让其他部分工作..

    【讨论】:

      【解决方案2】:

      好吧,经过几次尝试和搜索,我认为唯一的调试方法是使用 Chrome。我的意思是,我没有找到使用 Visual Studio Code、Atom 或其他 IDE 进行调试的任何有效方法。我会考虑 https://github.com/Polymer/polymer/issues/3635 作为我的问题的答案。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-04-06
        • 1970-01-01
        • 1970-01-01
        • 2015-07-15
        相关资源
        最近更新 更多