B2G/gecko/browser/devtools/debugger/debugger-controller.js
/**
   * Update the source editor's current caret and debug location based on
   * a specified url and line.
   *
   * @param string aUrl
   *        The target source url.
   * @param number aLine
   *        The target line number in the source.
   * @param boolean aNoSwitch
   *        Pass true to not switch to the script if not currently selected.
   * @param boolean aNoCaretFlag
   *        Pass true to not set the caret location at the specified line.
   * @param boolean aNoDebugFlag
   *        Pass true to not set the debug location at the specified line.
   */
Update the source editor's current caret and debug location based on
a specified url and line.

@param string aUrl
The target source url.
@param number aLine
The target line number in the source.
@param boolean aNoSwitch
Pass true to not switch to the script if not currently selected.
@param boolean aNoCaretFlag
Pass true to not set the caret location at the specified line.
@param boolean aNoDebugFlag
Pass true to not set the debug location at the specified line.
Update the source editor ' s current caret and debug location based on a specified url and line . @param string aUrl The target source url . @param number aLine The target line number in the source . @param boolean aNoSwitch Pass true to not switch to the script if not currently selected . @param boolean aNoCaretFlag Pass true to not set the caret location at the specified line . @param boolean aNoDebugFlag Pass true to not set the debug location at the specified line .
function SF_updateEditorToLocation(aUrl, aLine, aNoSwitch, aNoCaretFlag, aNoDebugFlag) {
    let editor = DebuggerView.editor;
    function set() {
      if (!aNoCaretFlag) {
        editor.setCaretPosition(aLine - 1);
      }
      if (!aNoDebugFlag) {
        editor.setDebugLocation(aLine - 1);
      }
    }
    if (DebuggerView.Scripts.isSelected(aUrl)) {
      return set();
    }
    if (!aNoSwitch && DebuggerView.Scripts.contains(aUrl)) {
      DebuggerView.Scripts.selectScript(aUrl);
      return set();
    }
    editor.setCaretPosition(-1);
    editor.setDebugLocation(-1);
  }
function SF_updateEditorToLocation ( aUrl , aLine , aNoSwitch , aNoCaretFlag , aNoDebugFlag ) { let editor = DebuggerView . editor ; function set ( ) { if ( ! aNoCaretFlag ) { editor . setCaretPosition ( aLine - 1 ) ; } if ( ! aNoDebugFlag ) { editor . setDebugLocation ( aLine - 1 ) ; } } if ( DebuggerView . Scripts . isSelected ( aUrl ) ) { return set ( ) ; } if ( ! aNoSwitch && DebuggerView . Scripts . contains ( aUrl ) ) { DebuggerView . Scripts . selectScript ( aUrl ) ; return set ( ) ; } editor . setCaretPosition ( - 1 ) ; editor . setDebugLocation ( - 1 ) ; }
Update the source editor's current caret and debug location based on
 a specified url and line.
Update the source editor ' s current caret and debug location based on a specified url and line .
// Move the editor's caret to the proper url and line.