Home>Article>Development Tools> Debugging node-webkit using sublime text 2 and 3

Debugging node-webkit using sublime text 2 and 3

藏色散人
藏色散人 forward
2019-10-02 14:34:22 2757browse

The following columnsublime usage tutorialwill introduce you to the method of debugging node-webkit in sublime text 2 and 3. I hope it will be helpful to friends in need!

Debugging node-webkit using sublime text 2 and 3

#sublime text 2 is an excellent cross-platform editor for developing node-webkit applications.

Mac OS X

1. Download node-webkit.app and place it in the /Application folder

2. Select from the sublime text 2 menu Tools -> Build System -> New Build System

3. Enter the following code:

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

1. Use sublime text 2's File -> New Window to open a new window

2. Use Project -> Add Folder to Project to add a project to the current window

3. Open your main application file from the menu on the left (for example: index.html ) and then select Tools -> Build

4. At this point the node-webkit application will start your project and you can see the debug output in sublime text2

Used in sublime text3 The method is the same.

Windows

#Same as above, the difference is the command to establish the system, as shown below (replace the actual path of nw.exe):

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

The above is the detailed content of Debugging node-webkit using sublime text 2 and 3. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:segmentfault.com. If there is any infringement, please contact admin@php.cn delete