I'm trying to create a Google Chrome DevTools Remote debugging session.
I have a remote debugging session, running on this URL:
chrome-devtools://devtools/remote/serve_rev/@8925c3c45f3923bc78ffc841842183cc592a0143/inspector.html?ws=localhost:8888/5f3be6ad-c4dd-4835-baf6-99779b6de1f6&remoteFrontend=true&dockSide=unlocked&experiments=true
And I have a Node.js server, connected to remote DevTools via a Websocket connection.
I'm trying to send following message to the remote debugging session:
id: 1,
method: "Log.entryAdded",
params: {
timestamp: (new Date).getTime(),
text: "Forced reflow while executing JavaScript took 47ms",
source: "violation",
level: "verbose",
}
The remote session clearly receives the message, judging from the Network log. (It's the last one)
But the dev tools don't seem to interpret the message correctly. As my Console is empty. But I'd expect a line, containing the a text message from above.
I'm stuck on this problem, as I don't know how to even debug this any further.
Help much aprreciated
Managed to somewhat work this out.
I actually had to enable
{
method: "Page.enable"
}
and
{
method: "Page.getResourceTree"
}
in the debugger.
Now remote debugger correctly displays gathered console.log data. Therefore, enabling only
{
method: "Log.enable"
}
does not seem to be enough. Remote debugger needs more data than this, to interpret console.log data.