Added js to determine debug status