# Install bashdb with Homebrew, MacPorts, Nix

Bash shell debugger. Version 5.2-1.2.0 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:bashdb
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install bashdb
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install bashdb
```

  Evidence: MacPorts ports tree: devel/bashdb/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#bashdb
```

  Evidence: nixpkgs package indexes: pkgs/by-name/ba/bashdb/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:bashdb
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/bashdb>
- **Version:** 5.2-1.2.0
- **Source summary:** Bash shell debugger
- **Homepage:** <https://bashdb.sourceforge.net/>
- **Repository:** <https://github.com/Trepan-Debuggers/bashdb>
- **Upstream docs:** <https://bashdb.readthedocs.io/>
- **License:** GPL-2.0-or-later
- **Source archive:** <https://downloads.sourceforge.net/project/bashdb/bashdb/5.2-1.2.0/bashdb-5.2-1.2.0.tar.bz2>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- bashdb (cli)
- bashdb (alias)

## Dependencies

- bash

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 5.2-1.2.0
- Local data: ok
- Upstream repository: https://bashdb.sourceforge.net/
- info: No package-manager update timestamp was available.
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

BASH Debugger, usually packaged as bashdb, is a source-level debugger for Bash scripts. Its own README describes it as a debugger for Bash 5.2 and later, with older repository branches supporting older Bash releases, and says its command syntax follows the zsh debugger, the Trepan family of debuggers, and GNU gdb.

### Project history

The project grew out of earlier work to make Bash itself expose enough line, source-file, call-stack, and command information for a real debugger. The NEWS file describes an initial release of something worthy of being called a debugger after earlier ksh/bash debuggers lacked reliable line reporting through loops, conditionals, functions, and sourced files.

BashDB's release history tracks the Bash runtime closely: first public releases targeted Bash 2.x-era debugging support, version 3.00 was the first release for Bash 3.0 in 2004, the 4.0 series was a major rewrite for Bash 4.0 in 2008, and later branches followed Bash 4.1, 4.2, 4.3, 4.4, 5.0, 5.1, and 5.2.

### Adoption history

The THANKS file records distribution and platform work from packagers for Cygwin, SuSE RPMs, Debian, and NetBSD, as well as Emacs, JetBrains, and VS Code integration work. The README also links a Repology packaging badge, reflecting its long life as a small but widely packaged Unix developer tool.

BashDB has been useful where shell programs became large enough to need breakpoints, stepping, stack traces, and debugger command files, especially generated configure scripts and complex administrative shell code.

### How it is used

The README documents three entry points: running a script under `bash --debugger`, invoking the `bashdb` executable directly, or sourcing debugger support from inside a running script and entering the debugger lazily. It also documents command-file and tty setup for debugging configure scripts whose stdin is closed.

The debugger exposes gdb-like commands for breakpoints, stepping, stack inspection, display/watch expressions, command history, aliases, tty control, source listing, and conditional breakpoints.

### Why package nerds care

BashDB is package-nerd significant because it is one of the rare tools that treats shell scripts as debuggable programs rather than disposable glue. It also mirrors a classic packaging pattern: separate branches and release lines track interpreter ABI and behavior changes across Bash versions.

Its history is a reminder that debugger support often depends on cooperation from the language runtime. The project credits Chet Ramey and Bash changes that made call stacks, source lines, and command tracking practical.

### Timeline

- 2003: Early 0.x releases add gdb-like commands, DDD and Emacs support, call-stack handling, and Bash debugger patches.
- 2004: Version 3.00 0.01 is released as the first Bash 3.0 release.
- 2008: Version 4.0-0.1 is a major rewrite for Bash 4.0 and adds aliases, autoeval, shunit2 tests, and improved Emacs support.
- 2010: Version 4.1-0.4 changes the startup file from `.bashdbinit` to `$HOME/.bashdbrc` and requires Bash 4.1 or later.
- 2019: Version 5.0-0.1.1.0 revises the debugger for Bash 5.0.
- 2020s: The bash-5.2 branch documents Bash 5.2-and-newer support while older branches support older Bash releases.

### Related projects

- The README explicitly relates BashDB to zshdb, the Trepan debuggers, and GNU gdb. The THANKS file also names shunit2 for tests and points to Emacs dbgr work after older bundled Emacs Lisp was removed.

### Sources

- <https://bashdb.sourceforge.net/>
- <https://github.com/Trepan-Debuggers/bashdb/blob/bash-5.2/NEWS.md>
- <https://github.com/Trepan-Debuggers/bashdb/blob/bash-5.2/README.md>
- <https://github.com/Trepan-Debuggers/bashdb/blob/bash-5.2/THANKS.md>


## Security Notes

escape, surveillance, or offensive capability signal. generalized runtime or code generation signal.

- **Geiger risk:** red / medium
- escape, surveillance, or offensive capability signal
- generalized runtime or code generation signal


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ~/.bashdbrc, <project>/.bashdbrc
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** bashdb
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Nix - bashdb: normalized package name match | nixpkgs package indexes: pkgs/by-name/ba/bashdb/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - bashdb: normalized package name match | MacPorts ports tree: devel/bashdb/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [bash](https://www.automicvault.com/pkg/brew/bash/) - Runtime dependency declared by Homebrew.
- [crash](https://www.automicvault.com/pkg/brew/crash/) - Shares av.db curated category or tags: cli, debugging, developer-tools, shell.
- [ddd](https://www.automicvault.com/pkg/brew/ddd/) - Shares av.db curated category or tags: cli, debugger, debugging, developer-tools.
- [delve](https://www.automicvault.com/pkg/brew/delve/) - Shares av.db curated category or tags: cli, debugger, debugging, developer-tools.
- [gdb](https://www.automicvault.com/pkg/brew/gdb/) - Shares av.db curated category or tags: cli, debugger, debugging, developer-tools.
- [gdbgui](https://www.automicvault.com/pkg/brew/gdbgui/) - Shares av.db curated category or tags: cli, debugger, debugging, developer-tools.
- [mspdebug](https://www.automicvault.com/pkg/brew/mspdebug/) - Shares av.db curated category or tags: cli, debugger, debugging, developer-tools.
- [oclgrind](https://www.automicvault.com/pkg/brew/oclgrind/) - Shares av.db curated category or tags: cli, debugger, debugging, developer-tools.
- [remake](https://www.automicvault.com/pkg/brew/remake/) - Shares av.db curated category or tags: cli, debugger, debugging, developer-tools.

## Combined YAML source

View the package source record on GitHub. [combined/bashdb.yml](https://github.com/automic-vault/db/blob/main/combined/bashdb.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
