WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
21031
Breakpoints in the condition of loops only breaks the first time
https://bugs.webkit.org/show_bug.cgi?id=21031
Summary
Breakpoints in the condition of loops only breaks the first time
Kevin McCullough
Reported
2008-09-23 11:43:23 PDT
While you can break in a loop or on the conditional line (the line with "for", "while" etc), you can only break on the conditional line the first time * STEPS TO REPRODUCE 1. Open the attached testcase 2. Open the inspector and set a breakpoint on a line that has a conditional (like a for or while loop) 3. Click on the link 4. You'll hit the breakpoint. Then hit continue. This will run the JS without hitting the breakpoint again. <
rdar://problem/6204189
>
Attachments
Test case
(1.04 KB, text/plain)
2008-09-23 11:44 PDT
,
Kevin McCullough
no flags
Details
Patch
(6.72 KB, patch)
2008-09-23 14:11 PDT
,
Kevin McCullough
ggaren
: review+
Details
Formatted Diff
Diff
Proposed patch
(6.58 KB, patch)
2008-09-24 14:07 PDT
,
Kevin McCullough
ggaren
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Kevin McCullough
Comment 1
2008-09-23 11:44:03 PDT
Created
attachment 23711
[details]
Test case
Kevin McCullough
Comment 2
2008-09-23 14:11:01 PDT
Created
attachment 23723
[details]
Patch
Geoffrey Garen
Comment 3
2008-09-23 15:41:53 PDT
Comment on
attachment 23723
[details]
Patch r=me, with changes we wrote on your computer.
Kevin McCullough
Comment 4
2008-09-24 14:07:16 PDT
Created
attachment 23763
[details]
Proposed patch Because of some changes wrt 'for' loops I've asked for another review.
Geoffrey Garen
Comment 5
2008-09-24 15:03:42 PDT
if (!m_statement->isBlock()) generator.emitDebugHook(WillExecuteStatement, m_statement->firstLine(), m_statement->lastLine()); I just realized a lingering problem from the last time I reviewed this. Cases like the line above are wrong for loops. If you have do { do { } while(y); } while(x); The outer do will emit a debug hook for the inner do, then the inner do will emit a debug hook for itself. So, if you set a breakpoint on the inner do, it will be hit twice. I think you need to change this to "if (!m_statement->isBlock() && !m_statement->isLoop())". r=me with that change.
Geoffrey Garen
Comment 6
2008-09-24 15:03:51 PDT
Comment on
attachment 23763
[details]
Proposed patch r=me
Kevin McCullough
Comment 7
2008-09-24 15:19:30 PDT
Committed revision 36871.
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