Debugging can be problematic for a blind programmer. While Sodbeans has a debugger specifically for the Quorum language, they did not extend the program to support debugging of C++ or Java applications, so those parts of the user interface remained inaccessible. One solution is to use gdb directly from the command line. While the interface is more cumbersome, it is accessible, since it is all text. It is sometimes excessively verbose, dumping considerably more information than necessary at the time. Sighted users can easily scan over these dumps, but a blind user has to sit through considerable reading.
A problem with using gdb from the command line was that a GUI application seizes focus when it starts, and the screen readers only read content from a screen that currently has focus. This was particularly a problem when the program hit a breakpoint or segfaulted. The focus either remained on the program or would transfer to Sodbeans or some other program. Consequently, the gdb output of the breakpoint or fault would not be spoken by the screen reader. The effect often was that the program failed silently.
A solution to this problem is to add this content to the .gdbinit file:
python import os def stop_handler (event): os.system("espeak gdb") gdb.events.stop.connect (stop_handler)
Whenever gdb gains control, the stop_handler function runs. That function used espeak to say “gdb.”, providing an audible indication that gdb had gained control. The student can then cycle focus to the terminal window hosting gdb.