I see that this question has been posted and answered. However, the post answer does not work for me. The posted answer has 2 solutions:
1 - run bashdb as root
this does not work for me because the script I am trying to debug must be run as mqm. This script exits when it sees that it is being run (via bashdb) as root.
2 - Add the user to the group listed by ls -l $(tty)
I ran this command and got:
mqm@localhost.localdomain(/var/mqm/scripts): ls -l $(tty) crw--w----. 1 root tty 136, 0 Jun 17 10:11 /dev/pts/0
I ran (as root) usermod -a -G root mqm
and verified that the root group contains mqm -
then logged in as mqm, I re-ran
bashdb myscript
and again received this error
/usr/share/bashdb/lib/setshow.sh: line 91: /dev/pts/0: Permission denied