question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Developer Tools wasn't opend when I press F12

See original GitHub issue

I have Ubuntu Desktop 14.04.4 LTS and nw.js this: http://dl.nwjs.io/v0.16.0-rc1/nwjs-v0.16.0-rc1-linux-x64.tar.gz

I tried to press F12 button but it doesn’t work, then I tried with code snippet:

var win = nw.Window.get();
win.showDevTools('', function (item) {
     console.log(item);
});

and this:

require('nw.gui').Window.get().showDevTools();

with code snippet it opens new window but its blank (white screen) 😕 then I tried to appear toolbar, in package.json I insert this code:

"window": {
      "toolbar": true
  }

but it doesn’t work.

I uploaded my project, into the folder you can run npm start and it will deploy… https://mega.nz/#!1BA2HLSC

I seen terminal and there is some errors (maybe):

/usr/share/themes/MBuntu-Y-For-Unity/gtk-2.0/widgets/panel.rc:18: Unable to locate image file in pixmap_path: "images/panel/panel-normal.svg"
/usr/share/themes/MBuntu-Y-For-Unity/gtk-2.0/widgets/panel.rc:21: Background image options specified without filename
/usr/share/themes/MBuntu-Y-For-Unity/gtk-2.0/widgets/panel.rc:27: Unable to locate image file in pixmap_path: "images/panel/panel-active.svg"
/usr/share/themes/MBuntu-Y-For-Unity/gtk-2.0/widgets/panel.rc:30: Background image options specified without filename
/usr/share/themes/MBuntu-Y-For-Unity/gtk-2.0/widgets/panel.rc:61: error: invalid string constant "button", expected valid string constant
[883:883:0719/093014:ERROR:CONSOLE(1)] "Uncaught ReferenceError: DevToolsAPI is not defined", source:  (1)
[883:883:0719/093014:ERROR:CONSOLE(1)] "Uncaught ReferenceError: DevToolsAPI is not defined", source:  (1)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
TylerRickcommented, Jul 18, 2017

Update: It turns out maybe I wasn’t using the SDK version that I downloaded that I thought I was using after all.

I’d tried installing a few different ways, including adding the nw package to my package.json (yarn add --dev nw). I’m guessing it must have been using the version of nw from that npm package instead of my globally installed nw in /usr/bin.

Solution was apparently to read down further on https://www.npmjs.com/package/nw where it explains how to get it to use the SDK version… For example, with

npm install nw --nwjs_build_type=sdk

or (the way I ended up using/preferring), adding -sdk to the package name:

yarn add --dev nw@0.23.6-sdk-1

I am now able to open dev tools in my nw app. 👍

2reactions
TylerRickcommented, Jul 18, 2017

@vatex There’s are different downloads for SDK and “Normal” on https://nwjs.io/.

Did you ever get this working? I’m having the same issue (a year later)… 😞

Even though I downloaded the v0.23.6 SDK version like @rogerwang suggested, I get this same error when trying to win.showDevTools() programmatically:

[7797:7797:0718/150644.051485:ERROR:CONSOLE(1)] "Uncaught ReferenceError: DevToolsAPI is not defined", source:  (1)

and pressing F12 in the window doesn’t have any effect.

nw --version shows:

[0718/151607.420419:WARNING:chrome_main_delegate.cc(569)] final extension: 
nwjs 59.0.3071.115 
Read more comments on GitHub >

github_iconTop Results From Across the Web

f12 does not open developer tools, nor ... - Microsoft Community
I'm not able to get to the developer tools after installing ie 9. ... Under settings you should see Turn on/off Developer Tools...
Read more >
How to Enable/Disable 'Open the DevTools when the F12 key ...
In this Video, I will show you 'How to Enable/Disable ' Open the DevTools when the F12 key is pressed ' in Edge...
Read more >
Open Developer Tools console by default in IE11 (without ...
I feel there would be some error in the developer tools console but my problem is that by the time I press F12,...
Read more >
IE 11 Missing F12 Developer Tools - internet explorer
A new window will open with the Toolbar options. Open "Turn off developer options" and in the new window choose "DISABLED". Share.
Read more >
Use F12 to open Developer Tools on Chrome - Ask Different
Open Keyboard Shortcuts Preferences · Click "Mission Control" from the list · Untick "Show Dashboard" (disable default beahviour of F12 ) · Click...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found