connected debugTree option for qp
added unittest for qp