使用sublime text 2和3调试node-webkit

发布时间:2019-06-07 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了使用sublime text 2和3调试node-webkit脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。

sublime text 2是非常优秀的跨平台编辑器用于开发node-webkit应用。

Mac OS X

1.下载node-webkIT.app并放在/Application文件夹内
2.从sublime text 2菜单选择Tools -> Build System -> New Build System
3.输入以下代码:

{
    "cmd": ["node-webkit", "--enable-LOGging", "${PRoject_path:${file_path}}"],
    "working_dir": "${project_path:${file_path}}",
    "path": "/Applications/node-webkit.app/Contents/MacOS/"
}

1.使用sublime text 2的File -> New Window打开一个新的窗口
2.使用Project -> Add Folder to Project添加一个工程到当前窗口中
3.从左侧的菜单中打开你的主应用程序文件(例如:index.htML)然后选择Tools -> Build
4.此时node-webkit应用程序将会启动你的项目并且可以在sublime text2中看到调试输出

在sublime text3中使用方法一样。

Windows

同上面一样,不同的是建立系统的命令,如下所示(替换掉nw.exe的实际路径):

{
    "cmd": ["nw.exe", "--enable-logging", "${project_path:${file_path}}"],
    "working_dir": "${project_path:${file_path}}",
    "path": "C:/Tools/node-webkit/",
    "shell": true
}

脚本宝典总结

以上是脚本宝典为你收集整理的使用sublime text 2和3调试node-webkit全部内容,希望文章能够帮你解决使用sublime text 2和3调试node-webkit所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。