How to install

From a Package

Repology maintains a list of various bundled kshdb packages. Below are some specific distributions that contain kshdb.

At the time this documentation was built, here is status that they provide:

packagestatus

Check the link above for more up-to-date information.

git

Many package managers have back-level versions of this debugger. The most recent versions is from the github.

To install from git:

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

If you’ve got a suitable ksh installed, then

$ make && make test

To try on a real program such as perhaps /etc/default/profile:

$ ./kshdb -L /etc/default/profile # substitute .../profile with your favorite ksh script

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

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

_Dbg_debugger
# start debugging here

Above, the directory path-to-kshdb should be replaced with the directory that dbg-trace.sh is located in. This can also be from the source code directory kshdb 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 you are happy and make test above worked, install via:

sudo make install

and uninstall with:

$ sudo make uninstall # ;-)