Debug directive and tests