toiletmonster has asked for the wisdom of the Perl Monks concerning the following question:
my other option is to not use DB.pm at all and to use open2() on perl -d. which is not as pretty. and the annoying thing with that is the debugger writes to /dev/tty instead using STDOUT and STDIN, and that was giving me fits too because i want vim to display to /dev/tty and the debugger always takes over.#!/usr/bin/perl -w package PerlDebugger; use DB; @ISA = qw( DB ); sub new { my $type = shift; my $self = {}; bless $self, $type; } sub startDebugger { my $self = shift; my $sourceCode = shift; print "\n>>$sourceCode<<\n"; $self->register(); print ">>" . $self->loadfile( $sourceCode, -1 ) . "<<\n"; print ">>" . $self->ready() . "<<\n"; print "\n>>"; print $DB::filename; print "<<\n"; } sub quit { my $self = shift; $self->done(); } package main; use strict; my $code = "/home/eric/code/tmp/foo.pl"; my $dbgr = PerlDebugger->new(); $dbgr->startDebugger( $code );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: vim perl debugger integration
by toiletmonster (Novice) on Oct 29, 2002 at 01:38 UTC | |
|
Re: vim perl debugger integration
by atcroft (Abbot) on Oct 29, 2002 at 00:03 UTC |