richterger / Perl-LanguageServer

Language Server for Perl
Other
219 stars 53 forks source link

add req_source #180

Closed wielandp closed 1 year ago

wielandp commented 1 year ago

to enable debugging of "eval $string"

wielandp commented 1 year ago

An example of code, which can be debugged with this change:

use warnings;

my $code = '
print 1;
print 2;
print 3;
print 4;
print 5;
6;';

my @result = eval $code;

use Data::Dump qw{pp} ;
print STDERR "result = ". pp(@result)."\n" ;
wielandp commented 1 year ago

Thanks to @LanX for some hints :-)

richterger commented 1 year ago

In case it's a real file and not an eval, there the mapping via client2server needs to be applied. I will add it after the merge