function TC_setBreakpoint(aLocation, aOnResponse) {
    // A helper function that sets the breakpoint.
    let doSetBreakpoint = function _doSetBreakpoint(aCallback) {
      let packet = { to: this._actor, type: DebugProtocolTypes.setBreakpoint,
                     location: aLocation };
      this._client.request(packet, function (aResponse) {
        // Ignoring errors, since the user may be setting a breakpoint in a
        // dead script that will reappear on a page reload.
        if (aOnResponse) {
          let bpClient = new BreakpointClient(this._client, aResponse.actor,
                                              aLocation);
          if (aCallback) {
            aCallback(aOnResponse(aResponse, bpClient));
          } else {
            aOnResponse(aResponse, bpClient);
          }
        }
      }.bind(this));
    }.bind(this);

    // If the debuggee is paused, just set the breakpoint.
    if (this.paused) {
      doSetBreakpoint();
      return;
    }
    // Otherwise, force a pause in order to set the breakpoint.
    this.interrupt(function(aResponse) {
      if (aResponse.error) {
        // Can't set the breakpoint if pausing failed.
        aOnResponse(aResponse);
        return;
      }
      doSetBreakpoint(this.resume.bind(this));
    }.bind(this));
  }
/**
   * Request to set a breakpoint in the specified location.
   *
   * @param object aLocation
   *        The source location object where the breakpoint will be set.
   * @param function aOnResponse
   *        Called with the thread's response.
   */
Request to set a breakpoint in the specified location.
@param object aLocation
The source location object where the breakpoint will be set.
@param function aOnResponse
Called with the thread's response.
Request to set a breakpoint in the specified location . @param object aLocation The source location object where the breakpoint will be set . @param function aOnResponse Called with the thread ' s response .
function TC_setBreakpoint(aLocation, aOnResponse) {
    let doSetBreakpoint = function _doSetBreakpoint(aCallback) {
      let packet = { to: this._actor, type: DebugProtocolTypes.setBreakpoint,
                     location: aLocation };
      this._client.request(packet, function (aResponse) {
        if (aOnResponse) {
          let bpClient = new BreakpointClient(this._client, aResponse.actor,
                                              aLocation);
          if (aCallback) {
            aCallback(aOnResponse(aResponse, bpClient));
          } else {
            aOnResponse(aResponse, bpClient);
          }
        }
      }.bind(this));
    }.bind(this);
    if (this.paused) {
      doSetBreakpoint();
      return;
    }
    this.interrupt(function(aResponse) {
      if (aResponse.error) {
        aOnResponse(aResponse);
        return;
      }
      doSetBreakpoint(this.resume.bind(this));
    }.bind(this));
  }
function TC_setBreakpoint ( aLocation , aOnResponse ) { let doSetBreakpoint = function _doSetBreakpoint ( aCallback ) { let packet = { to : this . _actor , type : DebugProtocolTypes . setBreakpoint , location : aLocation } ; this . _client . request ( packet , function ( aResponse ) { if ( aOnResponse ) { let bpClient = new BreakpointClient ( this . _client , aResponse . actor , aLocation ) ; if ( aCallback ) { aCallback ( aOnResponse ( aResponse , bpClient ) ) ; } else { aOnResponse ( aResponse , bpClient ) ; } } } . bind ( this ) ) ; } . bind ( this ) ; if ( this . paused ) { doSetBreakpoint ( ) ; return ; } this . interrupt ( function ( aResponse ) { if ( aResponse . error ) { aOnResponse ( aResponse ) ; return ; } doSetBreakpoint ( this . resume . bind ( this ) ) ; } . bind ( this ) ) ; }
Request to set a breakpoint in the specified location.
Request to set a breakpoint in the specified location .
// A helper function that sets the breakpoint. // Ignoring errors, since the user may be setting a breakpoint in a // dead script that will reappear on a page reload. // If the debuggee is paused, just set the breakpoint. // Otherwise, force a pause in order to set the breakpoint. // Can't set the breakpoint if pausing failed.