I'm playing with chrome dev_tools (the source code, not the app) per https://developer.chrome.com/devtools/docs/contributing as a learning exercise before I write an extension panel.
I curiously noted that console.log statements from these tools do not seem to end up in the console. While this was unexpected at first it makes sense. I also noted that internal dev_tools like Timeline and Console do not seem to have access to "getBackgroundPage" (see google chrome extension :: console.log() from background page? for info). Accessing chrome.extension is undefined :(. I can however call console.log, I just seem to be unable to find where this logs to :/.
In the interim I've come up with an annoying workaround where by I make sure each class has a reference to WebInspector.console ala
WebInspector.TimelineModel.console = WebInspector.console;
And then wrap and use this to make the results of a logging function I wrote end up in inspector console for the tab in question:
var bglog = function(obj, thing) {
WebInspector.TimelineModel.console.log(obj, thing);
};
Anyone have any better ideas?