Github user ilooner commented on a diff in the pull request: https://github.com/apache/drill/pull/984#discussion_r144193392 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/compile/CodeCompiler.java --- @@ -110,6 +109,11 @@ public CodeGenCompiler(final DrillConfig config, final OptionSet optionManager) public static final String DISABLE_CACHE_CONFIG = COMPILE_BASE + ".disable_cache"; /** + * Enables saving generated code for debugging + */ + public static final String ENABLE_SAVE_CODE_FOR_DEBUG = COMPILE_BASE + ".codegen.dump"; --- End diff -- The directory that generated code is dumped into is determined by the ClassBuilder.CODE_DIR_OPTION property. The DirTestWatcher createw a directory of the following form: ``` /target/<Fully qualified test class name>/<test method name> ``` So if the ClassBuilder.CODE_DIR_OPTION property is configured to use the directory generated by the DirTestWatcher, the code is dumped into the same well defined location every test run. Also the generated class file has names like: ``` <interface name>Gen<random num>.java ```
---