Pergunta

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?

Foi útil?

Solução

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

Outras dicas

While fully accepting that the remote-shell-port is deprecated, I found that starting two instances of chrome - one without the remote-shell-port and one with - and then working with the first instance works. Note that I found that the ordering was important, start the instance with the remote-shell-port second ...

"C:\Documents and Settings\rlong\Local Settings\Application Data\Google\Chrome\Application\chrome.exe"
"C:\Documents and Settings\rlong\Local Settings\Application Data\Google\Chrome\Application\chrome.exe" --remote-shell-port=9222
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top