implement better debug for some html testing functions