【发布时间】: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