I would like to check that certain code is being dead code eliminated by Closure compiler, but this is hard to do when everything is renamed.
It looks like "advanced optimizations" enables both renaming and DCE, without any granularity.
Is there a way to achieve the question in the title?
The easiest thing to do is use the --debug flag as documented here:
https://github.com/google/closure-compiler/wiki/Flags-and-Options
This uses a alternate renaming scheme that retains the original name as part of the new name. This is also useful for trying to understand what will and won't be renamed as part of advanced optimizations.
Otherwise, using the Java API it is possible to take full control of the optimizations that are run and disable renaming directly using the CompilerOptions#setRenamingPolicy[1]