debug R mode