Book Image

NW.js Essentials

By : Alessandro Benoit, Roger Weng
Book Image

NW.js Essentials

By: Alessandro Benoit, Roger Weng

Overview of this book

Table of Contents (17 chapters)
NW.js Essentials
About the Author
About the Reviewers

Remote debugging

In order to enable remote debugging, you have to add the --remote-debugging-port=port parameter to NW.js. You can do this from the command line / terminal:

$ nwjs --remote-debugging-port=9222 /path/to/your/project


As a reviewer of the book pointed out in NW.js v0.12.0, the remote debugging feature is not working correctly and is showing a blank page. In order to fix the issue, make sure to upgrade at least to v0.12.1.

You can also enable remote debugging directly from the Sublime Text NW.js builder script. To edit the build file previously created in Chapter 1, Meet NW.js, you have to open Sublime Text and navigate to Preferences | Browse Packages located relatively on the Files menu in Microsoft Windows or on the Sublime Text menu in Mac OS X.

The Packages folder will be shown. Now open the user folder, locate the nw-js.sublime-build file, and open it in Sublime Text. Now you can edit the first line of the file, as follows:

"cmd": ["nwjs", "--remote-debugging-port=9222...