Ignore:
Timestamp:
Feb 5, 2020, 6:19:10 PM (5 years ago)
Author:
Devin Rousso
Message:

Web Inspector: Sources: add a special breakpoint for controlling whether debugger statements pause
https://bugs.webkit.org/show_bug.cgi?id=206818

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

  • inspector/protocol/Debugger.json:
  • inspector/agents/InspectorDebuggerAgent.h:
  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::InspectorDebuggerAgent::setPauseOnDebuggerStatements): Added.

  • bytecompiler/NodesCodegen.cpp:

(JSC::DebuggerStatementNode::emitBytecode):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::dumpLineColumnEntry):

  • interpreter/Interpreter.h:
  • interpreter/Interpreter.cpp:

(JSC::Interpreter::debug):
(WTF::printInternal):

  • debugger/Debugger.h:

(JSC::Debugger::setPauseOnDebuggerStatements): Added.

  • debugger/Debugger.cpp:

(JSC::Debugger::didReachDebuggerStatement): Added.
(JSC::Debugger::didReachBreakpoint): Deleted.
Replace DebugHookType::DidReachBreakpoint with DebugHookType::DidReachDebuggerStatement,
as it is only actually used for debugger; statements, not breakpoints.

Source/WebInspectorUI:

  • UserInterface/Controllers/DebuggerManager.js:

(WI.DebuggerManager):
(WI.DebuggerManager.prototype.async initializeTarget):
(WI.DebuggerManager.prototype.get debuggerStatementsBreakpoint): Added.
(WI.DebuggerManager.prototype.isBreakpointRemovable):
(WI.DebuggerManager.prototype._breakpointDisabledStateDidChange):

  • UserInterface/Views/SourcesNavigationSidebarPanel.js:

(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype._insertDebuggerTreeElement):
(WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint):

  • UserInterface/Views/BreakpointTreeElement.css:

(.breakpoint-debugger-statement-icon .icon): Added.

  • UserInterface/Images/DebuggerStatement.svg: Added.
  • Localizations/en.lproj/localizedStrings.js:

LayoutTests:

  • inspector/debugger/setPauseOnDebuggerStatements.html: Added.
  • inspector/debugger/setPauseOnDebuggerStatements-expected.txt: Added.
File:
1 edited

Legend:

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

    r251425 r255887  
    9090    void setPauseOnExceptionsState(PauseOnExceptionsState);
    9191
     92    void setPauseOnDebuggerStatements(bool enabled) { m_pauseOnDebuggerStatements = enabled; }
     93
    9294    enum ReasonForPause {
    9395        NotPaused,
     
    133135    void willExecuteProgram(CallFrame*);
    134136    void didExecuteProgram(CallFrame*);
    135     void didReachBreakpoint(CallFrame*);
     137    void didReachDebuggerStatement(CallFrame*);
    136138
    137139    virtual void recompileAllJSFunctions();
     
    227229
    228230    PauseOnExceptionsState m_pauseOnExceptionsState;
     231    bool m_pauseOnDebuggerStatements : 1;
    229232    bool m_pauseAtNextOpportunity : 1;
    230233    bool m_pauseOnStepOut : 1;
Note: See TracChangeset for help on using the changeset viewer.