Bug 210324

Summary: Web Inspector: Debugger: add a Step next that steps by expression
Product: WebKit Reporter: Devin Rousso <drousso>
Component: Web InspectorAssignee: Devin Rousso <drousso>
Severity: Normal CC: drousso, ews-watchlist, inspector-bugzilla-changes, joepeck, keith_miller, mark.lam, msaboff, sbarati, timothy, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 210588    
Description Flags
[Video] After Patch is applied
Patch none

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]
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]

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

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]

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