Skip to content

Debugging with devtools

zcbenz edited this page Oct 3, 2012 · 22 revisions

Note: following guides only apply to node-webkit >= v0.2.2

Open Developer Tools

In order to show the Debug menu, you should manually append an developer switch:

$ nw --developer

Note, on Windows the command parameter is a little different:

nw /developer

Then you can open devtools from the application menu Debug -> Show DevTools.

Note: On Windows and Linux, you need to make sure nw.pak is in the same directory with nw(Linux) or nw.exe (Window)

Bugs of Developer Tools

Currently not everything of developer tools is working well, bellow are the things that don't work:

  • node modules don't shown in script sources

Why the devtools shows an empty window?

Under certain Windows machines, the devtools loads very slow, it may show a white page at first and needs about 30s to be fully loaded. This is not a bug of node-webkit, devtools in node-webkit is indeed a remote debugger, it needs to open a local server and transfer data via sockets.

So if you encounter empty window when opening the devtools, please check following things:

  • nw.pak should be in the same directory with nw.exe.
  • Your proxy settings.
  • Antivirus or firewall software.
  • Check if you boot your Windows VM in VMWare Fusion mode.

If you still have problems after making sure nothing is slowing down the devtools, than you have to wait until devtools is fully loaded.

Clone this wiki locally