Dynamic check for visible debug menu as opposed to setting variable

Removed isVisible variable, as it might not always be unset correctly (ie, if we call dismissViewController manually on the navigationController)