Bug 151175 - Web Inspector: Add Debug toolbar button to toggle InspectorBackend.dumpInspectorProtocolMessages
Summary: Web Inspector: Add Debug toolbar button to toggle InspectorBackend.dumpInspec...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-11-11 19:06 PST by Joseph Pecoraro
Modified: 2015-11-16 10:43 PST (History)
8 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (5.17 KB, patch)
2015-11-11 19:11 PST, Joseph Pecoraro
joepeck: commit-queue-
Details | Formatted Diff | Diff
[IMAGE] Debug Toolbar Button (Active) (28.67 KB, image/png)
2015-11-11 19:11 PST, Joseph Pecoraro
no flags Details
[PATCH] Proposed Fix (8.27 KB, patch)
2015-11-11 20:46 PST, Joseph Pecoraro
bburg: review+
bburg: commit-queue-
Details | Formatted Diff | Diff
[PATCH] For Landing (8.29 KB, patch)
2015-11-11 21:35 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2015-11-11 19:06:00 PST
* SUMMARY
Add Debug toolbar button to toggle InspectorBackend.dumpInspectorProtocolMessages.

I find myself toggling this many many times a day. Having a UI button to toggle this would be much better.

* NOTES
- Toolbar button should be debug only, not included in Production (minified) builds
Comment 1 Radar WebKit Bug Importer 2015-11-11 19:06:26 PST
<rdar://problem/23511452>
Comment 2 Joseph Pecoraro 2015-11-11 19:11:08 PST
Created attachment 265350 [details]
[PATCH] Proposed Fix
Comment 3 Joseph Pecoraro 2015-11-11 19:11:58 PST
Created attachment 265351 [details]
[IMAGE] Debug Toolbar Button (Active)
Comment 4 Joseph Pecoraro 2015-11-11 19:19:46 PST
Comment on attachment 265350 [details]
[PATCH] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=265350&action=review

> Source/WebInspectorUI/UserInterface/Debug/Bootstrap.jsSource/WebInspectorUI/UserInterface/Base/Bootstrap.js:44
> +    WebInspector.showDebugInspectorToolbarButtonSetting = new WebInspector.Setting("show-debug-inspector-toolbar-button", false);
> +    WebInspector.showDebugInspectorToolbarButtonSetting.addEventListener(WebInspector.Setting.Event.Changed, function() {

Brian wants to make this a keyboard shortcut to enable all debug features. Something like (Shift+Option+Cmd+D). That seems fine to me. I'll make a new patch.
Comment 5 Joseph Pecoraro 2015-11-11 20:46:55 PST
Created attachment 265357 [details]
[PATCH] Proposed Fix
Comment 6 BJ Burg 2015-11-11 21:30:14 PST
Comment on attachment 265357 [details]
[PATCH] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=265357&action=review

r=me, thanks.

> Source/WebInspectorUI/UserInterface/Debug/Bootstrap.js:30
> +    WebInspector.showDebugUI = new WebInspector.Setting("show-debug-ui", false);
> +    new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.Option | WebInspector.KeyboardShortcut.Modifier.Shift | WebInspector.KeyboardShortcut.Modifier.CommandOrControl, "D", function() {
> +        WebInspector.showDebugUI.value = !WebInspector.showDebugUI.value;

Please suffix = Setting

> Source/WebInspectorUI/UserInterface/Debug/Bootstrap.js:38
> +    debugInspectorToolbarButton.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, function() {

use arrow function
Comment 7 Joseph Pecoraro 2015-11-11 21:35:16 PST
Created attachment 265360 [details]
[PATCH] For Landing
Comment 8 WebKit Commit Bot 2015-11-11 22:33:53 PST
Comment on attachment 265360 [details]
[PATCH] For Landing

Clearing flags on attachment: 265360

Committed r192351: <http://trac.webkit.org/changeset/192351>