Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: vim perl debugger integration

by toiletmonster (Novice)
on Oct 29, 2002 at 01:38 UTC ( [id://208651]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://208651]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2024-04-26 03:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found