Bug 210324 - Web Inspector: Debugger: add a Step next that steps by expression
Summary: Web Inspector: Debugger: add a Step next that steps by expression
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Local Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks: 210588
  Show dependency treegraph
 
Reported: 2020-04-09 23:58 PDT by Devin Rousso
Modified: 2020-04-21 13:12 PDT (History)
11 users (show)

See Also:


Attachments
Patch (59.00 KB, patch)
2020-04-10 00:05 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
[Video] After Patch is applied (1.95 MB, video/quicktime)
2020-04-10 00:13 PDT, Devin Rousso
no flags Details
Patch (59.73 KB, patch)
2020-04-10 00:19 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (59.73 KB, patch)
2020-04-14 16:04 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2020-04-09 23:58:58 PDT
When debugging minified code, if statement trees are often squished together with parenthesis and logical operators.

To give an example,
```
    a() && b() && c();
```
with the current set of stepping actions available right now, the only way to reach `c()` is to Step into and Step out of each function until `c()` is reached, which is a process that has many opportunities for a mistake.  Step next would act like Step over, except that instead of stepping statement-by-statement (e.g. Step next would step over the entire line until whatever is after the `;`) it would step expression-by-expression, but without stepping into any function calls.

Basically, it's a hybrid of Step over and Step into in that it steps to the next pause opportunity within the current (or ancestor) call frame.
Comment 1 Devin Rousso 2020-04-10 00:05:51 PDT
Created attachment 396055 [details]
Patch
Comment 2 EWS Watchlist 2020-04-10 00:06:32 PDT
This patch modifies the inspector protocol. Please ensure that any frontend changes appropriately use feature checks for new protocol features.
Comment 3 Devin Rousso 2020-04-10 00:13:50 PDT
Created attachment 396056 [details]
[Video] After Patch is applied
Comment 4 Devin Rousso 2020-04-10 00:19:00 PDT
Created attachment 396057 [details]
Patch

oops, forgot the new image 😅
Comment 5 Timothy Hatcher 2020-04-14 13:59:32 PDT
Comment on attachment 396057 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=396057&action=review

> Source/JavaScriptCore/inspector/protocol/Debugger.json:199
> +            "name": "stepNext",

stepToNextExpression? stepOverExpression?
Comment 6 Devin Rousso 2020-04-14 16:04:05 PDT
Created attachment 396469 [details]
Patch

rename "Step next" to just "Step"
Comment 7 EWS 2020-04-14 19:35:08 PDT
Committed r260113: <https://trac.webkit.org/changeset/260113>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 396469 [details].
Comment 8 Radar WebKit Bug Importer 2020-04-14 19:36:17 PDT
<rdar://problem/61802875>