Devel-Debug-Server

 view release on metacpan or  search on metacpan

bin/debugServer.pl  view on Meta::CPAN

#        subroutine   
#        package      
#        filename     
#        finished    
#        stackTrace   
#        variables    
#        result       
#
#    };
#=cut
sub updateProcessInfo {
    my ($infos) = @_;

    my $pid = $infos->{pid};
    $processesInfos{$pid} = $infos;

    #initialize other hashes if necessary
    if (!exists $commands{$pid}){
        $commands{$pid} = undef;
    }
    if (!exists $files{$pid}){

bin/debugServer.pl  view on Meta::CPAN

}

sub trace($){
    my ($text)=@_;
    open (my $fh,">>","./trace.log");
    $text = "[$$]".$text."\n";
    print $fh $text;
    close $fh;
}

sub updateEffectiveBreakpoints{
    my ($effectiveBreakpointsList) = @_;

    for my $breakpoint (@{$effectiveBreakpointsList}){
        my $file=                 $breakpoint->{file};                  
        my $requestedLineNumber =                 $breakpoint->{requestedLineNumber};
        my $effectiveLineNumber=  $breakpoint->{effectiveLineNumber};
        $effectiveBreakpoints->{$file}->{$requestedLineNumber} = $effectiveLineNumber ;
        if ($effectiveLineNumber != $requestedLineNumber){
            #we are in the case where where the requested line number wasn't on a breakable line, we correct the breakpoints info
            #only %effectiveBreakpoints keep informations about invalid breakpoints

lib/Devel/Debug/Server/Agent.pm  view on Meta::CPAN


sub absoluteName($){
    my ($fileName)=@_;
    if (! File::Spec->file_name_is_absolute( $fileName )){
        $fileName = File::Spec->rel2abs( $fileName ) ;
    }
    return $fileName;
}

#keep the breakpoint list up-to-date with the debug server
sub updateBreakPoints {
    my ($breakPointsServerVersion,$breakPointsList) = @_;

    if ($breakPointsServerVersion == $breakPointsVersion){
        return; #first check if there were no modification since last time
    }

    $breakPointsVersion = $breakPointsServerVersion;
    my @breakPoints = $ebug->all_break_points_with_condition();
    foreach my $breakPoint (@breakPoints) {



( run in 0.247 second using v1.01-cache-2.11-cpan-95122f20152 )