################################################################# --- DB.pm 2003/07/23 16:59:07 1.1 +++ DB.pm 2003/07/23 17:03:29 @@ -39,6 +39,34 @@ return 0; } + +sub ptkdb ($$) { + my ($class,$r) = @_; + + init(); + + # need to have a list of authorized remote hosts + $ENV{DISPLAY} = $r->get_remote_host.':0.0'; + $DB::connection_refused = 0; # try try again + require 'Devel/ptkdb.pm'; + $DB::single = 1; +# bug workaround? Pressing "Return" button at toplevel makes ptkdb hang. + $DB::subroutine_depth = 0 ; + $DB::step_over_depth = -1 ; + + if (ref $r) { + $SIG{INT} = \&DB::dbint_handler; + $r->register_cleanup(sub { + $SIG{INT} = \&DB::ApacheSIGINT(); + $DB::single = 0; # do not debug during withdraw + $DB::window->close_ptkdb_window; + }); + } + + return 0; +} + + 1; __END__ #################################################################