2nd iteration of magneto-debug