Web Inspector: Debugger: add a Step next that steps by expression
https://bugs.webkit.org/show_bug.cgi?id=210324
Reviewed by Timothy Hatcher.
Source/JavaScriptCore:
Step next is a hybrid of Step over and Step into which continues execution to the next pause
opportunity within the current (or ancestor) call frame. It is especially useful when trying
to debug minified code, such as trying to continue to c()
in a() && b() && c();
, where
Step over would continue to the next statement (i.e. after the ;
) and Step in would
continue to the first line inside a()
(and would require a Step out to get back).
- inspector/protocol/Debugger.json:
- inspector/agents/InspectorDebuggerAgent.h:
- inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::stepNext): Added.
- debugger/Debugger.h:
- debugger/Debugger.cpp:
(JSC::Debugger::stepNextExpression): Added.
(JSC::Debugger::atExpression):
(JSC::Debugger::clearNextPauseState):
Source/WebInspectorUI:
Step next is a hybrid of Step over and Step into which continues execution to the next pause
opportunity within the current (or ancestor) call frame. It is especially useful when trying
to debug minified code, such as trying to continue to c()
in a() && b() && c();
, where
Step over would continue to the next statement (i.e. after the ;
) and Step in would
continue to the first line inside a()
(and would require a Step out to get back).
- UserInterface/Controllers/DebuggerManager.js:
(WI.DebuggerManager.prototype.stepNext): Added.
- UserInterface/Base/Main.js:
(WI.contentLoaded):
(WI.debuggerStepNext): Added.
- UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerPaused):
(WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerResumed):
- Localizations/en.lproj/localizedStrings.js:
- UserInterface/Images/StepNext.svg: Added.
LayoutTests:
- inspector/debugger/stepping/stepNext.html: Added.
- inspector/debugger/stepping/stepNext-expected.txt: Added.
- inspector/debugger/stepping/stepInto.html:
- inspector/debugger/stepping/stepInto-expected.txt:
- inspector/debugger/stepping/stepOut.html:
- inspector/debugger/stepping/stepOut-expected.txt:
- inspector/debugger/stepping/stepOver.html:
- inspector/debugger/stepping/stepOver-expected.txt:
Renamed functions for clarity and added additional test cases from other commands.