How to debug javascript

I’d quite like to know the answer to this, too.