debug chat.js