This was a small module I put together to help find a JS related bug a client was reporting that wasn't consistently happening. With it, you can use console.dblog() to log JS to the Drupal dblog. This way you can check out logging after the client has reported the issue without having to be there in person.

It can be viewed and downloaded from the Github repo.