@@ -0,0 +1,1097 @@
+package org.minimallycorrect.javatransformer.internal.asm;%0A%0Aimport lombok.experimental.UtilityClass;%0Aimport org.objectweb.asm.tree.AbstractInsnNode;%0Aimport org.objectweb.asm.tree.InsnList;%0Aimport org.objectweb.asm.tree.MethodNode;%0Aimport org.objectweb.asm.util.Printer;%0Aimport org.objectweb.asm.util.Textifier;%0Aimport org.objectweb.asm.util.TraceMethodVisitor;%0A%0Aimport java.io.*;%0A%0A@UtilityClass%0Apublic class DebugPrinter %7B%0A%09public static void printByteCode(MethodNode m, String operation) %7B%0A%09%09InsnList inList = m.instructions;%0A%09%09System.out.println(m.name + %22 at stage %22 + operation + %22 maxLocals %22 + m.maxLocals + %22 maxStack %22 + m.maxStack);%0A%09%09AbstractInsnNode current = m.instructions.getFirst();%0A%09%09AbstractInsnNode last = m.instructions.getLast();%0A%0A%09%09Printer printer = new Textifier();%0A%09%09TraceMethodVisitor mp = new TraceMethodVisitor(printer);%0A%09%09while (true) %7B%0A%09%09%09current.accept(mp);%0A%09%09%09if (current == last)%0A%09%09%09%09break;%0A%09%09%09current = current.getNext();%0A%09%09%7D%0A%0A%09%09StringWriter sw = new StringWriter();%0A%09%09printer.print(new PrintWriter(sw));%0A%09%09printer.getText().clear();%0A%09%09System.out.println(sw);%0A%09%7D%0A%7D%0A

Add DebugPrinter to asm package