If I save the following line to an html file and open the file in chrome, it works fine.
<script> console.log('hello') </script>
But if you run chrome with --remote-shell-port=9222 the log doesn’t appear in the console.
Anybody know of a workaround?
remote-shell-port flag exposes V8 debugging protocol which basically
supports only JavaScript debugging capabilities available in V8 JavaScript
engine used in Chrome. Console is a feature of the browser and V8 knows
nothing about it like many other features including DOM and Network inspection.
This one of the reasons we’re working on a new remote debugging protocol
which will cover other domains as well. It is in development phase and
is changing but you can give it a try. See documentation at
http://code.google.com/chrome/devtools/docs/remote-debugging.html
In particular you should be interested in the console notifications: http://code.google.com/chrome/devtools/docs/protocol/console.html#events