NW.js How to debug when your main file is an JS file?

296 Views Asked by At

package.json:

{
    "name": "Test App",
    "main": "driver.js"
}

How to invoke the devtools?

I have tried:

const gui = require('nw.gui');
var win = gui.Window.get();
win.showDevTools();

But nothing happens...
Because there's no window?
If i use Window.open then hit F12 it shows the devtools of the new window but no logs from the code running at the main file (even with mixed context)

The code surely is running, i made it deposit a file on the system using fs.writeFileSync with success.
But at the first problem i get clueless, because no output...

0

There are 0 best solutions below