(command.CommandList
  children: [
    (command.Simple
      blame_tok: <_Dbg_help_add>
      more_env: []
      words: [
        {<_Dbg_help_add>}
        {<debug>}
        {
          (DQ <'debug [SCRIPT]\n'> <'\n'> <'Set up SCRIPT for debugging. \n'> <'\n'> 
            <'If SCRIPT is not given, take the script name from the command that is\n'> <'about to be executed.'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <_Dbg_do_debug>
      name: _Dbg_do_debug
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <_Dbg_shell_new_shell_profile>
              more_env: []
              words: [{<_Dbg_shell_new_shell_profile>}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <typeset>
              more_env: []
              words: [
                {<typeset>}
                {<Id.Lit_VarLike 'script_cmd='> 
                  (BracedVarSub
                    left: <Id.Left_DollarBrace '${'>
                    token: <Id.VSub_At '@'>
                    var_name: '@'
                    suffix_op: 
                      (suffix_op.Unary
                        op: <Id.VTest_ColonHyphen _>
                        arg_word: {($ Id.VSub_DollarName _Dbg_bash_command)}
                      )
                    right: <Id.Right_DollarBrace '}'>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
            (command.Sentence
              child: 
                (command.Simple
                  blame_tok: <typeset>
                  more_env: []
                  words: [
                    {<typeset>}
                    {<Id.Lit_VarLike 'set_Dbg_debug_cmd='> 
                      (DQ <'typeset _Dbg_debug_cmd='> 
                        (word_part.EscapedLiteral
                          token: <Id.Lit_EscapedChar '\\"'>
                          ch: '"'
                        ) ($ Id.VSub_DollarName script_cmd) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"')
                      )
                    }
                  ]
                  redirects: []
                  do_fork: T
                )
              terminator: <Id.Op_Semi _>
            )
            (command.AndOr
              children: [
                (command.DBracket
                  left: <Id.KW_DLeftBracket '[['>
                  expr: (bool_expr.Unary op_id:Id.BoolUnary_z child:{($ Id.VSub_DollarName BASH)})
                  right: <Id.Lit_DRightBracket ']]'>
                  redirects: []
                )
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'BASH='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'BASH='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'BASH='> name:BASH)
                      op: assign_op.Equal
                      rhs: {(SQ <bash>)}
                    )
                  ]
                  redirects: []
                )
              ]
              ops: [<Id.Op_DAmp _>]
            )
            (command.Simple
              blame_tok: <eval>
              more_env: []
              words: [{<eval>} {(DQ ($ Id.VSub_DollarName _seteglob))}]
              redirects: []
              do_fork: T
            )
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DParen
                              left: <Id.Op_DLeftParen _>
                              child: 
                                (arith_expr.Unary
                                  op_id: Id.Arith_Bang
                                  child: ($ Id.Lit_ArithVarLike _Dbg_script)
                                )
                              right: <Id.Op_DRightParen _>
                              redirects: []
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.Sentence
                      child: 
                        (command.ShAssignment
                          left: <Id.Lit_VarLike 'set_Dbg_debug_cmd='>
                          pairs: [
                            (AssignPair
                              left: <Id.Lit_VarLike 'set_Dbg_debug_cmd='>
                              lhs: 
                                (sh_lhs_expr.Name
                                  left: <Id.Lit_VarLike 'set_Dbg_debug_cmd='>
                                  name: set_Dbg_debug_cmd
                                )
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (DQ <'typeset _Dbg_debug_cmd='> 
                                    (word_part.EscapedLiteral
                                      token: <Id.Lit_EscapedChar '\\"'>
                                      ch: '"'
                                    ) ($ Id.VSub_DollarName BASH) <' --init-file '> (${ Id.VSub_Name _Dbg_shell_temp_profile) <' --debugger '> 
                                    ($ Id.VSub_DollarName script_cmd) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"')
                                  )
                                }
                            )
                          ]
                          redirects: []
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  spids: [160 173]
                )
                (IfArm
                  keyword: <Id.KW_Elif elif>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              left: <Id.KW_DLeftBracket '[['>
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobDEqual
                                  left: {($ Id.VSub_DollarName _Dbg_orig_0) <'///'>}
                                  right: {<Id.Lit_Other '*'> <'bashdb///'>}
                                )
                              right: <Id.Lit_DRightBracket ']]'>
                              redirects: []
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.Sentence
                      child: 
                        (command.ShAssignment
                          left: <Id.Lit_VarLike 'set_Dbg_debug_cmd='>
                          pairs: [
                            (AssignPair
                              left: <Id.Lit_VarLike 'set_Dbg_debug_cmd='>
                              lhs: 
                                (sh_lhs_expr.Name
                                  left: <Id.Lit_VarLike 'set_Dbg_debug_cmd='>
                                  name: set_Dbg_debug_cmd
                                )
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (DQ <'typeset _Dbg_debug_cmd='> 
                                    (word_part.EscapedLiteral
                                      token: <Id.Lit_EscapedChar '\\"'>
                                      ch: '"'
                                    ) ($ Id.VSub_DollarName BASH) <' '> ($ Id.VSub_DollarName _Dbg_orig_0) <' -q -L '> 
                                    ($ Id.VSub_DollarName _Dbg_libdir) <' '> ($ Id.VSub_DollarName script_cmd) 
                                    (word_part.EscapedLiteral
                                      token: <Id.Lit_EscapedChar '\\"'>
                                      ch: '"'
                                    )
                                  )
                                }
                            )
                          ]
                          redirects: []
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  spids: [196 212]
                )
              ]
              else_action: []
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
            (command.Simple
              blame_tok: <eval>
              more_env: []
              words: [{<eval>} {(DQ ($ Id.VSub_DollarName _resteglob))}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <eval>
              more_env: []
              words: [{<eval>} {($ Id.VSub_DollarName set_Dbg_debug_cmd)}]
              redirects: []
              do_fork: T
            )
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DParen
                              left: <Id.Op_DLeftParen _>
                              child: ($ Id.Lit_ArithVarLike _Dbg_set_basename)
                              right: <Id.Op_DRightParen _>
                              redirects: []
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.Simple
                      blame_tok: <_Dbg_msg>
                      more_env: []
                      words: [
                        {<_Dbg_msg>}
                        {(DQ <'Debugging new script with '> ($ Id.VSub_DollarName script_cmd))}
                      ]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  spids: [252 263]
                )
              ]
              else_kw: <Id.KW_Else else>
              else_action: [
                (command.Simple
                  blame_tok: <_Dbg_msg>
                  more_env: []
                  words: [
                    {<_Dbg_msg>}
                    {(DQ <'Debugging new script with '> ($ Id.VSub_DollarName _Dbg_debug_cmd))}
                  ]
                  redirects: []
                  do_fork: T
                )
              ]
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
            (command.Simple
              blame_tok: <typeset>
              more_env: []
              words: [
                {<typeset>}
                {<-r>}
                {<Id.Lit_VarLike 'old_quit_on_quit='> ($ Id.VSub_DollarName _Dbg_QUIT_ON_QUIT)}
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <export>
              more_env: []
              words: [{<export>} {<Id.Lit_VarLike '_Dbg_QUIT_ON_QUIT='> <1>}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <export>
              more_env: []
              words: [
                {<export>}
                {<Id.Lit_VarLike 'BASHDB_BASENAME_ONLY='> 
                  (DQ ($ Id.VSub_DollarName _Dbg_set_basename))
                }
              ]
              redirects: []
              do_fork: T
            )
            (command.DParen
              left: <Id.Op_DLeftParen _>
              child: 
                (arith_expr.UnaryAssign
                  op_id: Id.Node_PostDPlus
                  child: ($ Id.Lit_ArithVarLike _Dbg_DEBUGGER_LEVEL)
                )
              right: <Id.Op_DRightParen _>
              redirects: []
            )
            (command.Simple
              blame_tok: <Id.VSub_DollarName '$_Dbg_debug_cmd'>
              more_env: []
              words: [{($ Id.VSub_DollarName _Dbg_debug_cmd)}]
              redirects: []
              do_fork: T
            )
            (command.DParen
              left: <Id.Op_DLeftParen _>
              child: 
                (arith_expr.UnaryAssign
                  op_id: Id.Node_PostDMinus
                  child: ($ Id.Lit_ArithVarLike _Dbg_DEBUGGER_LEVEL)
                )
              right: <Id.Op_DRightParen _>
              redirects: []
            )
            (command.Simple
              blame_tok: <_Dbg_restore_from_nested_shell>
              more_env: []
              words: [{<_Dbg_restore_from_nested_shell>}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <export>
              more_env: []
              words: [
                {<export>}
                {<Id.Lit_VarLike '_Dbg_QUIT_ON_QUIT='> ($ Id.VSub_DollarName old_quit_on_quit)}
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
  ]
)