How do I get the bash debugger to work with ddd?

Solution 1:

I was able to get ddd and bashdb to play nice on Ubuntu 12.04 today:

  1. Remove the repo-supplied ddd:

    sudo apt-get remove ddd
    
  2. Fetch ddd v3.3.9 and install from source, e. g.:

    sudo apt-get build-dep ddd
    sudo apt-get install libmotif-dev
    wget http://ftp.gnu.org/gnu/ddd/ddd-3.3.9.tar.gz
    tar xvf ddd-3.3.9.tar.gz
    cd ddd-3.3.9
    ./configure
    make
    sudo make install
    

    Note: I had to make a single patch to the source code to get the build to work -- in ddd/strclass.C, we needed a #include <stdio.h>; at the top to define EOF.

  3. Make sure bashdb is installed:

    sudo apt-get install bashdb
    
  4. Launch with:

    ddd --debugger /usr/bin/bashdb -- {script name} {parameters}
    

Could not live without ddd + Bash.

Optional: gpg verification:

Search for sign on https://www.gnu.org/software/ddd/ will redirect to https://savannah.gnu.org/project/memberlist-gpgkeys.php?group=ddd

  1. Download ddd-keyring.gpg.

  2. Import it into your key chain:

    gpg --import ddd-keyring.gpg
    
  3. Verify the signature:

    wget http://ftp.gnu.org/gnu/ddd/ddd-3.3.9.tar.gz.sig
    gpg --verify
    

Solution 2:

To get ddd to work with the bash debugger on bash scripts, it's necessary to install bashdb too.

If it's not installed, you get:

enter image description here

Afterwards, ddd seems to work normally:

enter image description here