RESOLVED FIXED 209763
Web Inspector: provide a way for inspector to turn on/off ITP debug mode and AdClickAttribution debug mode
https://bugs.webkit.org/show_bug.cgi?id=209763
Summary Web Inspector: provide a way for inspector to turn on/off ITP debug mode and ...
Devin Rousso
Reported 2020-03-30 13:43:04 PDT
Now that we send ITP debug logs and AdClickAttribution debug logs to Web Inspector, we should have a way for Web Inspector to turn those debug modes on/off in addition to (or instead of) the Debug menu toggle.
Attachments
[Patch] WIP (23.55 KB, patch)
2020-04-10 21:25 PDT, Devin Rousso
hi: commit-queue-
[Patch] WIP (24.27 KB, patch)
2020-04-11 09:52 PDT, Devin Rousso
hi: commit-queue-
Patch (36.22 KB, patch)
2020-04-28 21:05 PDT, Devin Rousso
no flags
Patch (39.51 KB, patch)
2020-04-28 23:43 PDT, Devin Rousso
no flags
Devin Rousso
Comment 1 2020-04-10 21:25:47 PDT
Created attachment 396147 [details] [Patch] WIP needs tests and ChangeLog entries, but the logic seems to be working and I believe is therefore reviewable :)
EWS Watchlist
Comment 2 2020-04-10 21:26:27 PDT
This patch modifies the inspector protocol. Please ensure that any frontend changes appropriately use feature checks for new protocol features.
Devin Rousso
Comment 3 2020-04-11 09:52:37 PDT
Created attachment 396168 [details] [Patch] WIP don't broadcast a console message if the state doesn't change
Blaze Burg
Comment 4 2020-04-15 15:44:00 PDT
Comment on attachment 396168 [details] [Patch] WIP View in context: https://bugs.webkit.org/attachment.cgi?id=396168&action=review Looks good to me overall. Some things to finish per our discussion: - Inspector tests for new settings - Handling multiple inspected pages in NetworkProcess - Recover from crashed inspected pages that turned on ITP debug mode > Source/WebCore/inspector/InspectorClient.h:67 > + enum class Preference { Can we call these DeveloperPreferences just to not mix them up with Safari preferences or WebCore settings?
Devin Rousso
Comment 5 2020-04-28 21:05:05 PDT
Devin Rousso
Comment 6 2020-04-28 23:43:00 PDT
John Wilander
Comment 7 2020-04-29 15:03:27 PDT
Does this automatically turn off ITP Debug Mode when the browser is quit/killed?
Devin Rousso
Comment 8 2020-04-29 15:07:19 PDT
(In reply to John Wilander from comment #7) > Does this automatically turn off ITP Debug Mode when the browser is quit/killed? It should turn off ITP Debug Mode and Ad Click Attribution Debug Mode when Web Inspector closes. Also, these paths shouldn't involve anything persistent (e.g. `NSUserDefaults`), so another "yes" as well :)
Blaze Burg
Comment 9 2020-05-01 15:55:43 PDT
Comment on attachment 397934 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=397934&action=review r=me, please investigate Windows EWS failure: UnifiedSource-f74e0903-3.cpp C:\cygwin\home\buildbot\worker\Windows-EWS\build\Source\WebCore\inspector/agents/InspectorPageAgent.cpp(464,1): error C2051: case expression not constant (compiling source file C:\cygwin\home\buildbot\worker\Windows-EWS\build\WebKitBuild\Release\DerivedSources\WebCore\unified-sources\UnifiedSource-84c9f43f-6.cpp) [C:\cygwin\home\buildbot\worker\Windows-EWS\build\WebKitBuild\Release\Source\WebCore\WebCore.vcxproj] > Source/WebInspectorUI/ChangeLog:12 > + Enable: [ ] ITP Debug Mode If we have documentation for these things, then a link to that documentation from the settings page would be Awesome. If not, shouldn't we document it?
Devin Rousso
Comment 10 2020-05-01 16:33:33 PDT
Comment on attachment 397934 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=397934&action=review (In reply to Brian Burg from comment #9) > r=me, please investigate Windows EWS failure: > > UnifiedSource-f74e0903-3.cpp > C:\cygwin\home\buildbot\worker\Windows-EWS\build\Source\WebCore\inspector/agents/InspectorPageAgent.cpp(464,1): error C2051: case expression not constant (compiling source file C:\cygwin\home\buildbot\worker\Windows-EWS\build\WebKitBuild\Release\DerivedSources\WebCore\unified-sources\UnifiedSource-84c9f43f-6.cpp) [C:\cygwin\home\buildbot\worker\Windows-EWS\build\WebKitBuild\Release\Source\WebCore\WebCore.vcxproj] The windows bot doesn't seem to update/regenerate DerivedSources properly. This has happened a bunch of times when I've made changes to the protocol. A clean build has always fixed the issue. >> Source/WebInspectorUI/ChangeLog:12 >> + Enable: [ ] ITP Debug Mode > > If we have documentation for these things, then a link to that documentation from the settings page would be Awesome. > > If not, shouldn't we document it? We have the old blog post for the Device Settings menu <https://webkit.org/changing-page-settings-on-ios-using-web-inspector/>, as well as the section about ITP debug mode <https://webkit.org/intelligent-tracking-prevention-2-3/> and Ad Click Attribution debugging <https://webkit.org/blog/8943/privacy-preserving-ad-click-attribution-for-the-web/>. Ideally, we'd "combine" those three into a new reference page. Perhaps I can write one once/before this is in the hands of actual users :)
EWS
Comment 11 2020-05-04 12:51:21 PDT
Committed r261103: <https://trac.webkit.org/changeset/261103> All reviewed patches have been landed. Closing bug and clearing flags on attachment 397934 [details].
Radar WebKit Bug Importer
Comment 12 2020-05-04 12:52:16 PDT
Alex Christensen
Comment 13 2020-05-04 14:28:10 PDT
Comment on attachment 397934 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=397934&action=review > Source/WebCore/inspector/agents/InspectorPageAgent.cpp:452 > + case Inspector::Protocol::Page::Setting::AdClickAttributionDebugModeEnabled: https://build.webkit.org/builders/Apple%20Win%2010%20Release%20%28Build%29/builds/13252/steps/compile-webkit/logs/stdio
Note You need to log in before you can comment on or make changes to this bug.