But for some reason it didn’t work for Chrome. So I kept looking and found weinre :

weinre is a debugger for web pages, like FireBug (for FireFox) and Web Inspector (for WebKit-based browsers), except it’s designed to work remotely, and in particular, to allow you debug web pages on a mobile device such as a phone.

The basic steps to get it working:

Install it via node package manager:

sudo npm -g install weinre

Run it on the console:

weinre --boundHost <IP ADDRESS OF THE WEB SERVER>

Link the website you want to debug to weinre by adding this to the page