Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest SDK download has a non-functional Window > DevTools menu item #7759

Closed
TomasHubelbauer opened this issue Jul 31, 2021 · 4 comments
Closed
Labels

Comments

@TomasHubelbauer
Copy link

I am using the latest version of NW.js and I have searched the issues and found these related closed issues: #5120 and #70. There are many other results but they mostly revolve around people not realizing they are not using the SDK version.

NWJS Version : nwjs-sdk-v0.54.1-osx-x64
Operating System : macOS

Expected behavior

Going to Window > Devtools brings up the DevTools. Using the Cmd+Option+i shortcut brings up the DevTools.

Actual behavior

Nothing happens. The only workaround is to use nw.Window.get().showDevTools();.

How to reproduce

  • Use the latest SDK download
  • Create index.html and package.json with index.html for main
  • Run using nwjs-sdk-v0.54.1-osx-x64/nwjs.app/Contents/MacOS/nwjs .
  • Click on Window > Devtools or try the Cmd+Option+i shortcut
  • Observe the DevTools not appearing
nw-js-devtools.mov

The screen recording only shows the NW.js window but the DevTools do not appear anywhere on the screen.

@TomasHubelbauer
Copy link
Author

I just found that right click and Inspect works as expected and shows the DevTools, so that's a useful work-around!

@frank-dspeed
Copy link

Sorry i am not a MacOs user i can not really help with that i hope some other mac users can do that. I can verify on all other oses that menu point does not even exist and i am not sure if that menu point at the top should exist on mac as far as i was aware mac should support only a single Menu point anyway

I Guess MacOs got updated. @rogerwang ?

@TomasHubelbauer
Copy link
Author

@frank-dspeed could you please check if the keyboard shortcut works on non-macOS? I am happy to get rid of the menu item, but I would like to be able to open the DevTools using the keyboard shortcut as opposed to having to use right-click > Inspect.

@TheJaredWilcurt
Copy link
Member

As others have mentioned you can right-click > inspect to open the dev tools, or right-click > inspect background page to open the dev tools for the Node process.

There are many keyboard shortcuts in Chromium to open various specific tabs in the dev tools (ctrl+shift+i, ctrl+shift+j, etc). However all of these are disabled (or rather, not in use) in NW.js. This is to allow your desktop app to use these keyboard shortcuts for it's own use. However you can press F12 and that does still bring it up (testing on OSX, Windows, Linux).

You can also add a keydown event listener to the body of the page's document and bind it to whatever keys you like, and then run the nw.Window.get().showDevTools() if you prefer.

Closing issue as functioning as intended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants