This could be used for ITP and AdClickAttribution debugging to start, rather than requiring the developer use Console.app and filter for specific channel names.
Created attachment 384676 [details] Patch
This patch modifies the inspector protocol generator. Please ensure that you have rebaselined any generator test results (i.e., by running `Tools/Scripts/run-inspector-generator-tests --reset-results`) This patch modifies the inspector protocol. Please ensure that any frontend changes appropriately use feature checks for new protocol features.
Comment on attachment 384676 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=384676&action=review > Source/WebInspectorUI/ChangeLog:3 > + Web Inspector: provide a way to log messages from the network process We should also add items to the device settings menu for ITP and Ad Click Attribution debug logging so that they can be controlled when remotely inspecting. > Source/WebKit/WebProcess/Network/NetworkProcessConnection.cpp:274 > + frame->addConsoleMessage(source, level, message); We should consider only sending a message to already open inspectors, so that messages aren't shown if an inspector is attached to a tab way later since messages are cached.
Comment on attachment 384676 [details] Patch r=me. Per our discussion, the approach looks good, but need to fix tests that are failing EWS.
Please rebase so we can land it.
Created attachment 394829 [details] Patch
Created attachment 394845 [details] Patch
Comment on attachment 394845 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=394845&action=review > Source/WebKit/NetworkProcess/NetworkProcess.cpp:2668 > +void NetworkProcess::broadcastConsoleMessage(JSC::MessageSource source, JSC::MessageLevel level, const String& message) This looks good, but you should consider adding a SessionID as a parameter and only broadcasting to web processes with the same session id. Otherwise you'll be sending private browsing logs to regular browsing pages and vice versa.
Comment on attachment 394845 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=394845&action=review >> Source/WebKit/NetworkProcess/NetworkProcess.cpp:2668 >> +void NetworkProcess::broadcastConsoleMessage(JSC::MessageSource source, JSC::MessageLevel level, const String& message) > > This looks good, but you should consider adding a SessionID as a parameter and only broadcasting to web processes with the same session id. Otherwise you'll be sending private browsing logs to regular browsing pages and vice versa. Good point! Thanks for taking a look :)
Created attachment 394948 [details] Patch
Committed r259236: <https://trac.webkit.org/changeset/259236> All reviewed patches have been landed. Closing bug and clearing flags on attachment 394948 [details].
<rdar://problem/61075075>