B2G/gecko/browser/devtools/debugger/debugger-controller.js
/**
   * Sets up a debugging session.
   *
   * @param DebuggerClient aClient
   *        The debugger client.
   * @param object aTabGrip
   *        The remote protocol grip of the tab.
   */
Sets up a debugging session.
@param DebuggerClient aClient
The debugger client.
@param object aTabGrip
The remote protocol grip of the tab.
Sets up a debugging session . @param DebuggerClient aClient The debugger client . @param object aTabGrip The remote protocol grip of the tab .
function DC__startDebuggingTab(aClient, aTabGrip) {
    if (!aClient) {
      Cu.reportError("No client found!");
      return;
    }
    this.client = aClient;
    aClient.attachTab(aTabGrip.actor, function(aResponse, aTabClient) {
      if (!aTabClient) {
        Cu.reportError("No tab client found!");
        return;
      }
      this.tabClient = aTabClient;
      aClient.attachThread(aResponse.threadActor, function(aResponse, aThreadClient) {
        if (!aThreadClient) {
          Cu.reportError("Couldn't attach to thread: " + aResponse.error);
          return;
        }
        this.activeThread = aThreadClient;
        DebuggerController.ThreadState.connect(function() {
          DebuggerController.StackFrames.connect(function() {
            DebuggerController.SourceScripts.connect(function() {
              aThreadClient.resume();
            });
          });
        });
      }.bind(this));
    }.bind(this));
  }
function DC__startDebuggingTab ( aClient , aTabGrip ) { if ( ! aClient ) { Cu . reportError ( "No client found!" ) ; return ; } this . client = aClient ; aClient . attachTab ( aTabGrip . actor , function ( aResponse , aTabClient ) { if ( ! aTabClient ) { Cu . reportError ( "No tab client found!" ) ; return ; } this . tabClient = aTabClient ; aClient . attachThread ( aResponse . threadActor , function ( aResponse , aThreadClient ) { if ( ! aThreadClient ) { Cu . reportError ( "Couldn't attach to thread: " + aResponse . error ) ; return ; } this . activeThread = aThreadClient ; DebuggerController . ThreadState . connect ( function ( ) { DebuggerController . StackFrames . connect ( function ( ) { DebuggerController . SourceScripts . connect ( function ( ) { aThreadClient . resume ( ) ; } ) ; } ) ; } ) ; } . bind ( this ) ) ; } . bind ( this ) ) ; }
Sets up a debugging session.
Sets up a debugging session .