Newer versions of Chrome have an easier option for debugging with no need to install the Android SDK. I've written an updated guide here.
Fixing bugs in web applications or websites can be a pain in Android devices since there's no obvious way to access the usual webtools (Chrome dev tools or Firebug, for instance).
Remote debugging
Recently, though, Google has developed remote debugging through Chrome - if your phone is running the Chrome browser, you can debug sites through your desktop. Full instructions are on the Android developer site, but essentially you'll need to have Chrome (stable or Canary) and the Android SDK installed on your desktop and then run a command through adb. This is by far the simplest way to debug Javascript problems on Android devices, since it gives you access to the complete set of Chrome webtools.
Javascript console
However, if you're not using Chrome on your phone and are stuck with the stock browser (or have a bug occurring only in the stock browser) then remote debugging won't work since it only works with Chrome on both devices.
There is an alternative way to debug though - Javascript console messages will appear in the DDMS console (or in adb's logcat). This means the usual console.log() (or .info(), .error() etc) methods are visible, which should give you at least some idea of what's happening on the device.
To view the console messages, you'll need to have the Android SDK set up; the easiest way to view the console is through Eclipse (or similar) in the DDMS view. In Eclipse, this is under
Window > Open Perspective > DDMS
; the console is at the bottom of the screen. You can filter the Javascript console messages by searching for 'console' in the filter.
Some more links: