B2G/gecko/browser/devtools/debugger/debugger-controller.js
/**
   * Add a breakpoint.
   *
   * @param object aLocation
   *        The location where you want the breakpoint. This object must have
   *        two properties:
   *          - url - the URL of the script.
   *          - line - the line number (starting from 1).
   * @param function [aCallback]
   *        Optional function to invoke once the breakpoint is added. The
   *        callback is invoked with two arguments:
   *          - aBreakpointClient - the BreakpointActor client object, if the
   *          breakpoint has been added successfully.
   *          - aResponseError - if there was any error.
   * @param boolean [aNoEditorUpdate=false]
   *        Tells if you want to skip editor updates. Typically the editor is
   *        updated to visually indicate that a breakpoint has been added.
   * @param boolean [aNoPaneUpdate=false]
   *        Tells if you want to skip any breakpoint pane updates.
   */
Add a breakpoint.
@param object aLocation
The location where you want the breakpoint. This object must have
two properties:
- url - the URL of the script.
- line - the line number (starting from 1).
@param function [aCallback]
Optional function to invoke once the breakpoint is added. The
callback is invoked with two arguments:
- aBreakpointClient - the BreakpointActor client object, if the
breakpoint has been added successfully.
- aResponseError - if there was any error.
@param boolean [aNoEditorUpdate=false]
Tells if you want to skip editor updates. Typically the editor is
updated to visually indicate that a breakpoint has been added.
@param boolean [aNoPaneUpdate=false]
Tells if you want to skip any breakpoint pane updates.
Add a breakpoint . @param object aLocation The location where you want the breakpoint . This object must have two properties : - url - the URL of the script . - line - the line number ( starting from 1 ) . @param function [ aCallback ] Optional function to invoke once the breakpoint is added . The callback is invoked with two arguments : - aBreakpointClient - the BreakpointActor client object if the breakpoint has been added successfully . - aResponseError - if there was any error . @param boolean [ aNoEditorUpdate = false ] Tells if you want to skip editor updates . Typically the editor is updated to visually indicate that a breakpoint has been added . @param boolean [ aNoPaneUpdate = false ] Tells if you want to skip any breakpoint pane updates .
function BP_addBreakpoint(aLocation, aCallback, aNoEditorUpdate, aNoPaneUpdate) {
    let breakpoint = this.getBreakpoint(aLocation.url, aLocation.line);
    if (breakpoint) {
      aCallback && aCallback(breakpoint);
      return;
    }
    this.activeThread.setBreakpoint(aLocation, function(aResponse, aBpClient) {
      this.store[aBpClient.actor] = aBpClient;
      this.displayBreakpoint(aBpClient, aNoEditorUpdate, aNoPaneUpdate);
      aCallback && aCallback(aBpClient, aResponse.error);
    }.bind(this));
  }
function BP_addBreakpoint ( aLocation , aCallback , aNoEditorUpdate , aNoPaneUpdate ) { let breakpoint = this . getBreakpoint ( aLocation . url , aLocation . line ) ; if ( breakpoint ) { aCallback && aCallback ( breakpoint ) ; return ; } this . activeThread . setBreakpoint ( aLocation , function ( aResponse , aBpClient ) { this . store [ aBpClient . actor ] = aBpClient ; this . displayBreakpoint ( aBpClient , aNoEditorUpdate , aNoPaneUpdate ) ; aCallback && aCallback ( aBpClient , aResponse . error ) ; } . bind ( this ) ) ; }
Add a breakpoint.
Add a breakpoint .