Can I launch console(F8) with script? (Solved)

Edit: (SOLVE): Thanks to Nolonar for the solution:
JavaScript:
require("nw.gui").Window.get().showDevTools();

So I need the console(F8) constantly, and it would be nice if I could have a script that opens the console?
Is there any script call that I can use that opens the console? I tried console.warn and such to no avail.

Best regards,
Bishiba
You'll want to use:
JavaScript:
require("nw.gui").Window.get().showDevTools();
Source: https://stackoverflow.com/a/35205269/1169228

I tested this in MZ, though I'm pretty sure it should work with MV as well.

Note that the source also has a solution involving the package.json file. I tried that as well, but it didn't work (for MZ that is).
You'll want to use:
JavaScript:
require("nw.gui").Window.get().showDevTools();
Source: https://stackoverflow.com/a/35205269/1169228

I tested this in MZ, though I'm pretty sure it should work with MV as well.

Note that the source also has a solution involving the package.json file. I tried that as well, but it didn't work (for MZ that is).
Works like a charm!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/can-i-launch-console-f8-with-script-solved.137984/