in reply to vim perl debugger integration

hmm.. thanks for the interest atcroft. i think i made some progress. the key is i have to require the script i am trying to debug. and also i had to add a sub called showfile().

this stuff is not documented which is sad because it means i have to read the DB.pm source (ack gasp) and understand perl internals and i don't know perl internals and i am afraid of perl internals.

anyway this is still very pre beta beginning new, but this seems to work (yeah!):
#!/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; eval( "require \"$sourceCode\";" ); $self->register(); print ">>" . $self->loadfile( $sourceCode, 3 ) . "<<\n"; print ">>" . $self->ready() . "<<\n"; print "\n>>"; print $DB::filename; print "<<\n"; } sub showfile { print "showfile\n"; } sub quit { my $self = shift; $self->done(); } package main; use strict; my $code = "perlbot.pl"; my $dbgr = PerlDebugger->new(); $dbgr->startDebugger( $code );
i take it you use vim, atcroft? if i ever actually finish this i'll post it up on vim.sf.net and probably some other places too.

thanks.