Ignore:
Timestamp:
Apr 14, 2020, 7:35:04 PM (5 years ago)
Author:
Devin Rousso
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/debugger/Debugger.h

    r255887 r260113  
    109109    void breakProgram();
    110110    void continueProgram();
     111    void stepNextExpression();
    111112    void stepIntoStatement();
    112113    void stepOverStatement();
     
    231232    bool m_pauseOnDebuggerStatements : 1;
    232233    bool m_pauseAtNextOpportunity : 1;
     234    bool m_pauseOnStepNext : 1;
    233235    bool m_pauseOnStepOut : 1;
    234236    bool m_pastFirstExpressionInStatement : 1;
Note: See TracChangeset for help on using the changeset viewer.