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.

How can I open chrome dev tool after build?

See original GitHub issue

How could I config to make me can open the chrome dev tool in after-build-app like in dev mode? I think it will make me find software bug more easy and easy to deal with it.

Issue Analytics

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

github_iconTop GitHub Comments

15reactions
SimulatedGREGcommented, May 13, 2017

@deboyblog

There are a couple ways to approach this, but a simple way would be is to add a globalShortcut to your app. Adding the following to app/src/renderer/main.js should do the trick…

import { remote } from 'electron'

remote.globalShortcut.register('CommandOrControl+Shift+K', () => {
  remote.BrowserWindow.getFocusedWindow().webContents.openDevTools()
})

window.addEventListener('beforeunload', () => {
  remote.globalShortcut.unregisterAll()
})
0reactions
travis5491811commented, Oct 25, 2019

@deboyblog

There are a couple ways to approach this, but a simple way would be is to add a globalShortcut to your app. Adding the following to app/src/renderer/main.js should do the trick…

import { remote } from 'electron'

remote.globalShortcut.register('CommandOrControl+Shift+K', () => {
  remote.BrowserWindow.getFocusedWindow().webContents.openDevTools()
})

window.addEventListener('beforeunload', () => {
  remote.globalShortcut.unregisterAll()
})

Thanks. This solution still works. I’m using vue-cli-plugin-electron-builder and have the code in /src/main.ts

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chrome DevTools
Get started with Google Chrome's built-in web developer tools. Open Chrome DevTools. All of the ways that you can open Chrome DevTools.
Read more >
Automatically open Chrome developer tools when new tab ...
On opening the developer tools, with the developer tools window in focus, press F1 . This will open a settings page. Check the...
Read more >
Your Simple Guide to Chrome DevTools [+ Step-by-Step ...
Right-click to inspect the page. The Chrome DevTools window will open. Click on each tab to access the tools. 1. Right-click to inspect ......
Read more >
The Beginner's Guide to Chrome Developer Tools
Open Developer Tools and go to “More Tools” > “Remote Devices”; Authorize the remote access on your Android device. There doesn't seem to...
Read more >
Chrome DevTools debugging tips and tricks - YouTube
Chrome DevTools debugging tips and tricks: inspecting elements, live expressions & code breakpoints. Watch later. Share. Copy link.
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