SPUG: Is there a call that will break into the debugger?

Colin Meyer cmeyer at helvella.org
Wed May 4 10:23:12 PDT 2005


On Wed, May 04, 2005 at 09:10:53AM -0700, Kevin Fink wrote:
> I always use $DB::single rather than $DB::signal, but both seem to work. 
> Does anyone know what the differences between the two are?  The man page 
> is a bit ambiguous on the issue...

Yeah, ambiguous to be sure.  From 'perldoc DB':

       $DB::single
               Single-step flag.  Will be true if the API will stop at the
               next statement.

       $DB::signal
               Signal flag. Will be set to a true value if a signal was
               caught.  Clients may check for this flag to abort time-consum-
               ing operations.

This is written for the perspective of programmers of "clients", which
are debugging frontends. It seems like setting $DB::single may be more
appropriate. Debugging front ends would expect $DB::signal to be set
after ^C is pressed, or a signal is sent to the program via some other
mechanism.

-Colin.


More information about the spug-list mailing list