Skip to content
R. Bernstein edited this page Mar 2, 2023 · 8 revisions

Table of Contents

From git

To install from git:

    git clone git://github.com/rocky/zshdb.git
    cd zshdb
    ./autogen.sh  # Add configure options. See ./configure --help

If a suitable zsh is already installed, then

    make && make test

To try on a real program such as perhaps /etc/zsh/zshrc:

    ./zshdb /etc/zsh/zshrc # substitute .../zshrc with any other zsh script

To modify source code to call the debugger inside the program:

    source path-to-zshdb/zshdb/dbg-trace.sh
    # work, work, work.

    _Dbg_debugger
    # start debugging here

Above, the directory path-to_zshdb should be replaced with the directory that dbg-trace.sh is located in. This can also be from the source code directory zshdb or from the directory dbg-trace.sh gets installed directory. The "source" command needs to be done only once somewhere in the code prior to using _Dbg_debugger.

If the result is satisfactory and make test above has worked, install via:

    sudo make install

and to uninstall, use:

    sudo make uninstall # ;-)

See INSTALL for generic configure installation instructions.

Arch

On Arch systems, and derivatives, zshdb can be installed by running:

   sudo pacman -Syu zshdb

On arch-based distros it is very important to include the yu flag when installing a package to make sure pacman will updates its database and install the latest package version of zshdb.

Debian/Ubuntu

On Debian systems, and derivatives, zshdb can be installed by running:

    sudo apt-get install zshdb

The latest version may not yet be included in the archives of a stable version of Debian or its derivative, so it may be necessary to install zshdb from the backports repository.

MacOSX

On OSX systems, zshdb can be installed from MacPorts or Homebrew:

    sudo port install zshdb
# OR
    brew install ---with-pcre zshdb  # note the --with-pcre option
Clone this wiki locally