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

Enable developer extras when WEBKIT_INSPECTOR_SERVER is defined #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions launcher/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@ int main(int argc, char* argv[])
if (!g_getenv("WPE_SHELL_DISABLE_CONSOLE_LOG"))
WKPreferencesSetLogsPageMessagesToSystemConsoleEnabled(preferences, true);

if (const char* value = g_getenv("WEBKIT_INSPECTOR_SERVER")) {
// Very naïve check for <ip>:<port>
if (strlen(value) > 2 && strchr(value, ':'))
WKPreferencesSetDeveloperExtrasEnabled(preferences, true);
}

WKPageGroupSetPreferences(pageGroup, preferences);

auto pageConfiguration = WKPageConfigurationCreate();
Expand Down