直接从 IDE/edit 工具发出调试聚合物
issues debugging polymer straight from IDE/edit tool
我对 Polymer 很陌生,我希望能够直接从一个 IDE 调试项目。我的意思是,而不是使用 Chrome 调试器,我更喜欢从 Visual Studio Code 或 Sublime 或 Atom 或其他工具进行调试(请注意,这个问题没有兴趣比较 IDEs可用。我只是想要一些方法来从任何 IDE).
进行调试
到目前为止我读过的所有科目都没有让我开车去任何可以帮助我的真正教程。我发现的唯一一个我做不到 运行。
我关注 https://medium.com/collaborne-engineering/debug-polymer-tests-with-vs-code-7646d66d0608,当我尝试 运行 WCT 时,我得到属性 'program' 不存在。
我的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 + 一些 extension/plugin 我更愿意。
好吧,经过几次尝试和搜索,我认为唯一的调试方法是使用 Chrome。我的意思是,我没有找到任何使用 Visual Studio 代码、Atom 或其他 IDE 进行调试的有效方法。我会考虑 https://github.com/Polymer/polymer/issues/3635 作为我问题的答案。
program 应该是 'wct' 如果你用 -g 安装它或者
"${workspaceRoot}/node_modules/.bin/wct" 如果您使用 npm 在本地安装它。
那应该可以解决您的错误,不过我还没有让其他部分正常工作..
我对 Polymer 很陌生,我希望能够直接从一个 IDE 调试项目。我的意思是,而不是使用 Chrome 调试器,我更喜欢从 Visual Studio Code 或 Sublime 或 Atom 或其他工具进行调试(请注意,这个问题没有兴趣比较 IDEs可用。我只是想要一些方法来从任何 IDE).
进行调试到目前为止我读过的所有科目都没有让我开车去任何可以帮助我的真正教程。我发现的唯一一个我做不到 运行。
我关注 https://medium.com/collaborne-engineering/debug-polymer-tests-with-vs-code-7646d66d0608,当我尝试 运行 WCT 时,我得到属性 'program' 不存在。
我的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 + 一些 extension/plugin 我更愿意。
好吧,经过几次尝试和搜索,我认为唯一的调试方法是使用 Chrome。我的意思是,我没有找到任何使用 Visual Studio 代码、Atom 或其他 IDE 进行调试的有效方法。我会考虑 https://github.com/Polymer/polymer/issues/3635 作为我问题的答案。
program 应该是 'wct' 如果你用 -g 安装它或者
"${workspaceRoot}/node_modules/.bin/wct" 如果您使用 npm 在本地安装它。
那应该可以解决您的错误,不过我还没有让其他部分正常工作..