Debugging dialog JS