سؤال

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