Bug 129524 - Web Inspector: debugger statements do not break
Summary: Web Inspector: debugger statements do not break
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.9
: P2 Major
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-02-28 17:34 PST by Jonathan Wells
Modified: 2014-03-03 14:07 PST (History)
6 users (show)

See Also:


Attachments
Web archive to reproduce the breakpoint bug. (1.62 KB, application/x-webarchive)
2014-02-28 17:34 PST, Jonathan Wells
no flags Details
debugger statement test case (290 bytes, application/x-gzip)
2014-03-03 12:00 PST, Mark Lam
no flags Details
the patch: now supporting debugger statements. (9.84 KB, patch)
2014-03-03 12:15 PST, Mark Lam
mark.lam: review-
Details | Formatted Diff | Diff
patch 2 (7.31 KB, patch)
2014-03-03 13:01 PST, Mark Lam
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Wells 2014-02-28 17:34:10 PST
Created attachment 225512 [details]
Web archive to reproduce the breakpoint bug.

Breakpoints do not seem to work. `debugger;` statements are skipped entirely. Breakpoints inserted in the inspector pretty print editor will not break the execution in WebKit r164860.

To reproduce for the debugger statement:

1. Open the attached breakpoint.webarchive
2. Open the web inspector
3. In the console, call: foo(). 

No breaking will occur.

To reproduce manually:

1. Open the attached breakpoint.webarchive
2. Open the web inspector
3. Click on Resources and open main.js
4. Add a breakpoint inside foo() on line 3 (the variable assignment)
5. Refresh the page.
Comment 1 Radar WebKit Bug Importer 2014-02-28 17:34:42 PST
<rdar://problem/16202928>
Comment 2 Mark Lam 2014-03-03 12:00:35 PST
Created attachment 225678 [details]
debugger statement test case

The previously attached test case has a bug where the function containing the debugger statement was never called.  Here's a new one.
Comment 3 Mark Lam 2014-03-03 12:15:16 PST
Created attachment 225681 [details]
the patch: now supporting debugger statements.
Comment 4 Mark Lam 2014-03-03 12:26:18 PST
Comment on attachment 225681 [details]
the patch: now supporting debugger statements.

This patch causes many unexpected inspector regressions. Looking into it.
Comment 5 Mark Lam 2014-03-03 13:01:28 PST
Created attachment 225685 [details]
patch 2

The previous patch has a union - struct tree that is a little too complex.  The result is that the compiler ended up expressing the outermost union as a struct instead.  In patch2, I flattened the union to only contain an unsigned and a struct.  With this, the inspector tests are passing again.
Comment 6 Geoffrey Garen 2014-03-03 13:56:56 PST
Comment on attachment 225685 [details]
patch 2

r=me
Comment 7 Mark Lam 2014-03-03 14:07:55 PST
Thanks.  Landed in r165008: <http://trac.webkit.org/r165008>.