Bug 151175

Summary: Web Inspector: Add Debug toolbar button to toggle InspectorBackend.dumpInspectorProtocolMessages
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, commit-queue, graouts, joepeck, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix
joepeck: commit-queue-
[IMAGE] Debug Toolbar Button (Active)
none
[PATCH] Proposed Fix
bburg: review+, bburg: commit-queue-
[PATCH] For Landing none

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>