Next: , Previous: , Up: Debugger Command Reference   [Contents][Index]


4.2 Getting help (‘help’)

Once inside the BASH debugger, you can always ask it for information on its commands, using the command help.

help
h

You can use help (abbreviated h) with no arguments to display a short list of named classes of commands:

bashdb<0> help
Available commands:
  action     condition  edit     frame    load     run     source  unalias
  alias      continue   enable   handle   next     search  step    undisplay
  backtrace  debug      eval     help     print    set     step-   untrace
  break      delete     examine  history  pwd      shell   step+   up
  clear      disable    export   info     quit     show    tbreak  watch
  commands   display    file     kill     return   signal  trace   watche
  complete   down       finish   list     reverse  skip    tty

Readline command line editing (emacs/vi mode) is available.
Type "help" followed by command name for full documentation.
help command

With a command name as help argument, the BASH debugger displays short information on how to use that command.

bashdb<0> help list
list [START|.|FN] [COUNT] -- List lines of a script.

START is the starting line or dot (.) for current line. Subsequent
list commands continue from the last line listed. If a function name
is given list the text of the function.

If COUNT is omitted, use the setting LISTSIZE. Use "set listsize" to
change this setting.

Aliases for list: l

In addition to help, you can use the debugger command info to inquire about the state of your script, or the state of the BASH debugger itself. The listings under info in the Index point to all the sub-commands. See Command Index.

info

This command (abbreviated i) is for describing the state of your program. For example, you can list the arguments given to your script with info args, or list the breakpoints you have set with info breakpoints. You can get a complete list of the info sub-commands with help info.

bashdb<0> help info
List of info subcommands:

info args -- Argument variables (e.g. $1, $2, ...) of the current stack frame.
info breakpoints -- Status of user-settable breakpoints
info display -- Show all display expressions
info files -- Source files in the program
info functions -- All function names
info line -- list current line number and and file name
info program -- Execution status of the program.
info signals -- What debugger does when program gets various signals
info source -- Information about the current source file
info stack -- Backtrace of the stack
info terminal -- Print terminal device
info variables -- All global and static variable names
info warranty -- Various kinds of warranty you do not have

Aliases for info: i
bashdb<1> info source
Current script file is parm.sh
Located in /tmp/parm.sh
Contains 34 lines.

Next: , Previous: , Up: Debugger Command Reference   [Contents][Index]