-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[v2] Add -devtools production build flag #2725
[v2] Add -devtools production build flag #2725
Conversation
Tested on wails doctor
@leaanthony Please test on |
@mmghv - When you say "Console window", do you mean the terminal which we use to run the app? I've tested the scenarios above, but if I use |
Yes, in debug mode on windows if I launch the app from file explorer, I get a terminal window in addition to the main window (that's why this feature was needed in the first place). Anyway, when using If you instead did |
I tested on MacOS and it appeared to do what you would expect. I'm happy with this so far. Feel free to mark it ready for review when you are ready. |
All ready, @stffabi you worked on this area of the code, could you please review it? |
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 👍 , thanks for doing this and taking your time.
Description
This adds the build flag
-devtools
which enables the devtools in production when-debug
is not used.Using
-debug
automatically enables devtools but it also includes go debug info which increases the binary size and shows the debug console window, sometimes you only need the ability to show the devtools in production build in personal projects to be able to debug the frontend on the fly.Note:
-debug
alone still enables the devtools.Note:
options.Debug.OpenInspectorOnStartup
still only works with-debug
.Fixes #1523
Type of change
How Has This Been Tested?
Here's how to test it :
1- Create a new project
wails init -n testproject -t vanilla
2- Follow these instructions (replace
[IDofThePR]
with2725
), and make sure to add thereplace
directive ingo.mod
.3- Change
testproject/main.go
to add this option, which needs be updated according to the test table :4- Build the application according to the following table and ensure the expected behavior in each case:
false
wails build
false
wails build -debug
true
wails build -debug
false
wails build -devtools
true
wails build -devtools
false
wails dev
true
wails dev
(To make it easier you could do all tests where
OpenInspectorOnStartup
isfalse
first, then change it totrue
and do the other tests)Test Configuration
wails doctor
Checklist:
website/src/pages/changelog.mdx
with details of this PR