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:
-
Remove the repo-supplied
ddd
:sudo apt-get remove ddd
-
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 defineEOF
. -
Make sure
bashdb
is installed:sudo apt-get install bashdb
-
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
Download
ddd-keyring.gpg
.-
Import it into your key chain:
gpg --import ddd-keyring.gpg
-
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:
Afterwards, ddd
seems to work normally: