Debugging in viewer.html