How to get console messages generated by chrome?

Skip to first unread message

Niranjan Rao

Jul 17, 2023, 1:03:17 PM7/17/23
to chrome-debugging-protocol

I've a custom chromium build. Essentially, I log the messages using following snippet. I do see the messages appearing in console window of the browser however I don't get Runtime.consoleAPICalled events back to me.

mojom::ConsoleMessageLevel::kInfo, msg));

How do I get notifications for messages not originating from Javascript?


Ophir Back

Jul 17, 2023, 1:15:16 PM7/17/23
to chrome-debugging-protocol
Take a look at the Console domain -
After you call `Console.enable()`, you should be seeing the `Console.messageAdded` event fired when console messages are written. 
The Runtime.consoleAPICalled event is related to using the API the console provides and not logs written to it, as far as I recall.

Niranjan Rao

Jul 17, 2023, 1:25:12 PM7/17/23

Thank you for quick reply. I'll investigate.



On 7/17/23 10:15, 'Ophir Back' via chrome-debugging-protocol wrote:
Take a look at the Console domain - https: //chromedevtools. github. io/devtools-protocol/tot/Console/ After you call `Console. enable()`, you should be seeing the `Console. messageAdded` event fired when console messages are written. The Runtime. consoleAPICalled
This Message Is From an External Sender
This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it. --
You received this message because you are subscribed to the Google Groups "chrome-debugging-protocol" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
Niranjan Rao | Sr.Architect
Paymentus Corporation The Real-Time Bill Payment CompanyTM
860 Hillview Court Suite 220 Milpitas CA 95035

Reply all
Reply to author
0 new messages