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
Devtools hotkey #2915
Devtools hotkey #2915
Conversation
Works as expected on windows. Now that F12 opens the devtools, maybe |
I'm open to discussion on this. The only edge case is Mac apps that want it enabled and want it on the appstore (does that combo even make sense???). |
Can't speak for Mac devs, but if I understand correctly there's no way around it if you want F12 or a runtime method to open it. Honestly F12 makes a lot of sense and makes life easier, it also solves the default contextmenu problem because now you don't have to show it with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, should we also warn in build.go that private APIs are being used on macOS when build-tag devtools
is used?
wails/v2/pkg/commands/build/build.go
Lines 351 to 353 in 3116c1a
if options.Platform == "darwin" && options.Mode == Debug { | |
pterm.Warning.Println("A darwin debug build contains private APIs, please don't distribute this build. Please use it only as a test build for testing and debug purposes.") | |
} |
I've changed the key combination to |
@mmghv - I've removed what I think is the right code to stop |
No it exists in all platforms but each with it's own way, also what you changed disabled the default context-menu on windows in |
@@ -499,7 +511,7 @@ func (f *Frontend) setupChromium() { | |||
if err != nil { | |||
log.Fatal(err) | |||
} | |||
err = settings.PutAreDefaultContextMenusEnabled(f.devtools || f.frontendOptions.EnableDefaultContextMenu) | |||
err = settings.PutAreDefaultContextMenusEnabled(f.frontendOptions.EnableDefaultContextMenu) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change disables the default context-menu on windows in dev & debug because f.devtools
is enabled for -devtools
, -debug
and dev mode.
Will do tomorrow 👍 |
This reverts commit e664a0c.
@mmghv - change reverted 👍 |
Description
This PR adds an F12 hotkey shortcut to open the devtools window, whenever the app is built with the
devtools
flag.Not sure if this could be an issue for signed apps... I don't think it is...
Fixes #2908
Type of change
How Has This Been Tested?
Create a new project, build with
wails build
and check F12 does nothing. Build withwails build -devtools
and press F12.Checklist:
website/src/pages/changelog.mdx
with details of this PR