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?

有帮助吗?

解决方案

Yes, you can use:

eval('debugger;');

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top