Use chrome.experimental.devtools.console to retrieve messages from the inspected page console and post messages there. getMessages() returns the list of messages on the console, onMessageAdded event provides notifications on new messages, and addMessage() allows an extension to add new messages.