How to run Chrome in debug mode?

261 views
Skip to first unread message

Dmitry Kravchenko

unread,
Jan 27, 2014, 6:12:47 PM1/27/14
to chromedev...@googlegroups.com
It is said here (https://code.google.com/p/chromedevtools/wiki/ChromeDevToolsProtocol), that to run Chrome in debug mode, one should use a command:

    chrome --remote-shell-port=<port>

I used 

    chrome --remote-shell-port=9222

which caused apparently normal Chrome started and nobody appeared listening port 9222 in netstat. Also no conneciton possible to localhost:9222.

How to force Chrome to be in debug mode? How to check if it is runnign in debug mode?

Alexander Pavlov

unread,
Jan 28, 2014, 2:00:55 AM1/28/14
to chromedev...@googlegroups.com
Hey Dmitry,

The URL you refer to is a wiki page of a no-longer-maintained project that enables Chrome JS debugging support in Java (I have fixed the renamed argument, by the way. Thanks for pointing that out.) The correct argument name is --remote-debugging-port. Please use the up-to-date documentation on remote debugging: https://developers.google.com/chrome-developer-tools/docs/debugger-protocol for your reference.


--
You received this message because you are subscribed to the Google Groups "chromedevtools-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromedevtools-...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
-alexander
Message has been deleted

Dmitry Kravchenko

unread,
Jan 28, 2014, 7:23:32 AM1/28/14
to chromedev...@googlegroups.com
Thanks, now I can see something on port 9222.

But what about Java API? Is it obsolete too?

When running the following code:

public static void main(String[] args) throws IOException, UnsupportedVersionException {


Browser browser = BrowserFactory.getInstance().create(new InetSocketAddress("localhost", 9222), null);
TabFetcher tabFetcher = browser.createTabFetcher();
List<? extends TabConnector> tabList = tabFetcher.getTabs();
BrowserTab tab = tabList.get(0).attach(new TabDebugEventListener() {

I am getting an exception, saying was unable to receive protocol response.
Reply all
Reply to author
Forward
0 new messages