quarkus.debug.transformed-classes-dir does not work anymore
This regression was introduced in:
https://github.com/quarkusio/quarkus/commit/9d3fa16a74c1b9354352843aab28ce71b3c95350#diff-db1d39a812769ff88e14c8dd8e39c0c4
diff --git a/core/deployment/src/main/java/io/quarkus/deployment/steps/ClassTransformingBuildStep.java b/core/deployment/src/main/java/io/quarkus/deployment/steps/ClassTransformingBuildStep.java
index b561d6ce92e..3277275a2d0 100644
--- a/core/deployment/src/main/java/io/quarkus/deployment/steps/ClassTransformingBuildStep.java
+++ b/core/deployment/src/main/java/io/quarkus/deployment/steps/ClassTransformingBuildStep.java
@@ -1,5 +1,7 @@
 package io.quarkus.deployment.steps;
 
+import java.io.File;
+import java.io.FileOutputStream;
 import java.nio.file.Path;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -22,6 +24,7 @@
 import org.objectweb.asm.ClassVisitor;
 import org.objectweb.asm.ClassWriter;
 
+import io.quarkus.bootstrap.BootstrapDebug;
 import io.quarkus.bootstrap.classloading.ClassPathElement;
 import io.quarkus.bootstrap.classloading.QuarkusClassLoader;
 import io.quarkus.deployment.QuarkusClassWriter;
@@ -104,7 +107,22 @@ public TransformedClassesBuildItem.TransformedClass call() throws Exception {
                                     visitor = i.apply(className, visitor);
                                 }
                                 cr.accept(visitor, 0);
-                                return new TransformedClassesBuildItem.TransformedClass(className, writer.toByteArray(),
+                                byte[] data = writer.toByteArray();
+                                if (BootstrapDebug.DEBUG_TRANSFORMED_CLASSES_DIR != null) {
+                                    File debugPath = new File(BootstrapDebug.DEBUG_TRANSFORMED_CLASSES_DIR);
+                                    if (!debugPath.exists()) {
+                                        debugPath.mkdir();
+                                    }
+                                    File classFile = new File(debugPath, className.replace(".", "/") + ".class");
+                                    classFile.getParentFile().mkdirs();
+                                    try (FileOutputStream classWriter = new FileOutputStream(classFile)) {
+                                        classWriter.write(data);
+                                    } catch (Exception e) {
+                                        log.errorf(e, "Failed to write transformed class %s", className);
+                                    }
+                                    log.infof("Wrote transformed class to %s", classFile.getAbsolutePath());
+                                }
+                                return new TransformedClassesBuildItem.TransformedClass(className, data,
                                         classFileName, eager.contains(className));
                             } finally {
                                 Thread.currentThread().setContextClassLoader(old);
['core/deployment/src/main/java/io/quarkus/deployment/steps/ClassTransformingBuildStep.java']