[wp-trac] [WordPress Trac] #32358: Add unminified jQuery to core for better debugging with SCRIPT_DEBUG enabled
WordPress Trac
noreply at wordpress.org
Wed Jun 29 11:43:17 UTC 2016
#32358: Add unminified jQuery to core for better debugging with SCRIPT_DEBUG
enabled
------------------------------------------------+--------------------------
Reporter: CrazyJaco | Owner:
Type: feature request | Status: assigned
Priority: normal | Milestone: Future
Component: Script Loader | Release
Severity: normal | Version:
Keywords: has-patch ongoing needs-unit-tests | Resolution:
| Focuses:
------------------------------------------------+--------------------------
Comment (by azaozz):
Replying to [comment:21 dotancohen]:
> Replying to [comment:20 iandunn]:
> > I don't think that's always true; sometimes I run into situations
during plugin development where I get errors like `TypeError: n is
undefined`. Knowing the real variable name and line number would give some
insight into the underlying problem.
>
> This is what brought me here. One cannot debug without knowing exactly
where the error was thrown. The minified versions obscure that
information, specifically the line number and the variable names.
And what would you do next after knowing the line number and eventually
the var name? Look at the trace to see which of your functions called
jQuery of course. I bet the error will always be in your function not in
the library.
And what is stopping you do the same when jQuery in minified? Well,
nothing really. The trace is the part you really want/need to debug it :)
> That will compress to well below 100 KiB. Adding 100 KiB to the 7.4 MiB
(zipped) or 6.8 MiB (tarball) Wordpress 4.4.2 is beyond negligible.
Not true in principle. Why would you want to force 20,000,000 - 30,000,000
people to download these ~100k every time WordPress is updated? (Leaving
the "terabytes of wasted bandwidth" calculation out.)
I don't mind adding the non-minified jQuery to /src. Still think it is
mostly pointless. The only user case is when somebody hits a bug in it at
which point they can probably download the non-minified version and
replace the file in their test install. We can save them the 2-3 min that
would usually take.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32358#comment:23>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list