debuggingyui-compressor

Tell YUI compressor to preserve my debugger; statements


I'm trying to use the debugger; statement to debug JS in Firefox, but YUI Compressor is interfering.

A complete pause of Firefox does not occur in uncompressed files, but in compressed files. For debugging, I want to use the debugger; statement, since setting breakpoints manually is impossible when YUI puts everything neatly into a single line.

Now, YUI remvoes the debugger; statement from source.

Is there a way to preserve the debugger; statement?


Solution

  • Yes, you can use:

    eval('debugger;');