+Explicit example:
+
+In shell window 1.
+
+cd regress
+export REGRESS_DEBUG=1
+export REGRESS_WAIT=1
+tests/name-of-script-test
+(wait until it tells you to start the debugger)
+
+In shell window 2
+
+cd regress/bin
+gdb bacula-xx (where xx is the component you want to debug).
+(possibly set a break point -- normally not)
+run -s -f
+(wait for the output to stop)
+
+In shell window 1
+(enter any character or simply a return)
+(ignore the error message it prints complaining that the daemon
+you are debugging is already running, which is in fact the case).
+
+
+That is all there is to it. The debugger window will get some
+output and will stop waiting for input if anything goes wrong
+like a seg fault. At that point, you can enter commands.
+
+The procedure avoids modifying the test scripts and trying to
+find pids and the such. If you want less debug output when
+debugging, don't set REGRESS_DEBUG=1.
+
+===
+