문제

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

다른 팁

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
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top