WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
166777
Can't put a breakpoint inside minified script in the main resource
https://bugs.webkit.org/show_bug.cgi?id=166777
Summary
Can't put a breakpoint inside minified script in the main resource
Simon Fraser (smfr)
Reported
2017-01-06 14:41:24 PST
I'm trying to debug
http://www.baidu.com/s?ie=utf-8&f=8&rsv_bp=0&rsv_idx=1&tn=baidu&wd=iPad%20pro&rsv_pq=e5e15bc5000304ba&rsv_t=89d6S0vXYIEqJKQ54HBscceCoq%2BvT94MX%2BpYLhaPExeuOii5Ir8cNoZuy9E&rqlang=cn&rsv_enter=1&rsv_sug3=9&rsv_sug2=0&inputT=1035&rsv_sug4=1035
on the iPad simulator, and would like to put a breakpoint on the code "$dom_headBlock.hide()" in the main document. However, I can't because this is never unmagnified.
Attachments
Add attachment
proposed patch, testcase, etc.
Simon Fraser (smfr)
Comment 1
2017-01-06 14:41:35 PST
^unminified
Radar WebKit Bug Importer
Comment 2
2017-01-06 14:46:21 PST
<
rdar://problem/29908995
>
Joseph Pecoraro
Comment 3
2017-01-06 14:49:11 PST
Possible solutions: 1. Preferred: Pretty Print HTML content 2. Half Way: Pretty Print at least <script> in HTML content 3. Always Useful: Right Click + Set Breakpoint at Exact Location I'm sure we have other bugs for (1). But I'd like to use this for (3) which should be pretty easy to do and has applicability even with Pretty Printed code! For example if you wanted to set a breakpoint inside of something that is not broken up across multiple lines even when pretty printed. Here is an arbitrary examples off the top of my head, deciding to pause inside of a default argument expression. function add(a, b = (() => |x + b))() { ... } This is a rather weird case that would be hard to pause in otherwise (you'd have to pause at the caller of add and step to get into it otherwise.
Simon Fraser (smfr)
Comment 4
2017-01-06 14:52:00 PST
I don't think I would have discovered 3). Also it would be super hard to step through minified JS, so I'm not sure it makes sense to allow breakpoints in the middle of a long line.
Joseph Pecoraro
Comment 5
2017-01-06 16:24:49 PST
(In reply to
comment #4
)
> Also it would be super hard to step through minified JS, so I'm not sure it > makes sense to allow breakpoints in the middle of a long line.
Stepping through minified JS should be much better now that we highlight exactly what expression / statement is about to execute. If we have issues there I can address them as well.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug