Question

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?

Was it helpful?

Solution

Yes, you can use:

eval('debugger;');

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top