Node.js 、Chrome 、EgretWing 扩展开发。开发过程中会遇到工具配置错误。
这就需要在EgretWing中的配置文件launch.json重新配置工具路径。

创建项目完成,在.wing文件夹下launch.json配置debug信息。
如上图:
{
"version": "0.2.0",
"configurations": [
{
"name": "Wing 内置播放器调试",
"type": "chrome",
"request": "launch",
"file": "index.html",
"runtimeExecutable": "${execPath}",
"useBuildInServer": true,
"sourceMaps": true,
"webRoot": "${workspaceRoot}",
"preLaunchTask":"build",
"port":5610
},
{
"name": "使用本机 Chrome 调试",
"type": "chrome",
"request": "launch",
"file": "index.html",
"runtimeExecutable": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
"useBuildInServer": true,
"sourceMaps": true,
"webRoot": "${workspaceRoot}",
"preLaunchTask":"build",
"port":5610
},
{
"name": "附加到 Chrome 进程",
"type": "chrome",
"request": "attach",
"port": 9222,
"webRoot": "${workspaceRoot}"
}
]
}
点击调试如下图:

launch.json 介绍
Wing 内置播放器调试 、使用本机 Chrome 调试、附加到 Chrome 进程。chrome、node、extensionHost。"launch" 或者 "attach"。C:\Program Files (x86)\Google\Chrome\Application\chrome.exe 或 /Applications/Google Chrome.app/Contents/MacOS/Google Chrome。操作演示如下:

原文:http://www.cnblogs.com/zhao-y/p/6537447.html