Summary: | Web Inspector: Stepping into a function / program should not require stepping to the first statement | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Joseph Pecoraro <joepeck> | ||||
Component: | Web Inspector | Assignee: | Joseph Pecoraro <joepeck> | ||||
Status: | RESOLVED DUPLICATE | ||||||
Severity: | Normal | CC: | bburg, joepeck, mark.lam, mattbaker, nvasilyev, saam, timothy, webkit-bug-importer, ysuzuki | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Joseph Pecoraro
2016-09-07 15:52:16 PDT
This is the same for stepping into a program. Test: 1. <script> 2. var before = 1; 3. eval("1 + 1"); 4. var after = 1; 5. </script> There are 3 pauses on line 3 because when we step-into we pause at 3 locations: PausedAtStartOfProgram PausedAtEndOfProgram PausedAtStatement After a long discussion with coworkers I think we all agree that there is very little value in pausing at the start of a program. Since there is nothing you can do that is different from pausing at the first statement within it. However there is value in pausing at the end of a program / end of a function. Since that is the last opportunity to view the state of things within the function (the value of the last statement for instance). Created attachment 288240 [details]
[PATCH] Proposed Fix
Comment on attachment 288240 [details]
[PATCH] Proposed Fix
cq- this depends on an earlier patch so it won't apply yet.
(In reply to comment #2) > This is the same for stepping into a program. > > Test: > 1. <script> > 2. var before = 1; > 3. eval("1 + 1"); > 4. var after = 1; > 5. </script> > > There are 3 pauses on line 3 because when we step-into we pause at 3 > locations: > > PausedAtStartOfProgram > PausedAtEndOfProgram > PausedAtStatement >:( Comment on attachment 288240 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=288240&action=review > LayoutTests/inspector/debugger/stepInto-expected.txt:-19 > -PAUSE AT testAlert:6:19 Nice nice. > Source/JavaScriptCore/debugger/Debugger.h:-95 > - PausedAfterCall, Is this completely redundant with PauseBeforeReturn? It doesn't seem like its removal caused any fewer pauses to happen in the test expectations. Comment on attachment 288240 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=288240&action=review r=me >> Source/JavaScriptCore/debugger/Debugger.h:-95 >> - PausedAfterCall, > > Is this completely redundant with PauseBeforeReturn? It doesn't seem like its removal caused any fewer pauses to happen in the test expectations. EDIT: this is for pausing when calling a function but before running the first statement. It's redundant with PausedAtStatement for the first statement. I rewrote everything here in an effort to fix other debugger stepping issues. I'm going to obsolete this patch. And likely duplicate this bug to a more general bug that addresses the larger stepping issues. Fixed as part of bug 155325: https://trac.webkit.org/changeset/206652 *** This bug has been marked as a duplicate of bug 155325 *** |