ent-perl libclass-refresh-perl libcompiler-lexer-perl \
libdata-dump-perl libio-aio-perl libjson-perl libmoose-perl libpadwalker-perl \
libscalar-list-utils-perl libcoro-perl
o start or container to exec inside or pod to use
=back
=head2 Debugger Settings for launch.json
=over
=item * C<type>: needs to be C<perl>
=item * C<request>: only C<launch> is support
ainerCmd> and C<conatinerName>.
There are more container options, see above.
.vscode/settings.json
{
"perl": {
"enable": true,
"containerCmd": "docker",
nt++ ;
return $self -> refcnt ($refcnt) - 1 ; # make sure there is no string value, so encode json encodes it as number
}
# -------------------------------------------------------------------
supportsConfigurationDoneRequest => JSON::true(),
# The debug adapter supports function breakpoints.
supportsFunctionBreakpoints => JSON::false(),
# The debug adapter s
lBreakpoints => JSON::true(),
# The debug adapter supports breakpoints that break execution after a specified number of hits.
supportsHitConditionalBreakpoints => JSON::false(),
);
use Coro ;
use Coro::AIO ;
use Coro::Handle ;
use AnyEvent;
use AnyEvent::Socket ;
use JSON ;
use Data::Dump qw{dump pp} ;
use IO::Select ;
use Perl::LanguageServer::Req ;
use Perl::L
on "perl"
Any comments and patches are welcome.
=cut
our $json = JSON -> new -> utf8(1) -> ascii(1) ;
our $jsonpretty = JSON -> new -> utf8(1) -> ascii(1) -> pretty (1) ;
our %running_req
c, $txt) = @_ ;
$txt ||= "<--- Notification: " ;
$notification -> {jsonrpc} = '2.0' ;
my $outdata = $json -> encode ($notification) ;
my $guard = $self -> out_semaphore -> guard
package Perl::LanguageServer::Methods ;
use Moose::Role ;
use JSON ;
use Data::Dump qw{pp} ;
no warnings 'uninitialized' ;
# ----------------------------------------------------------------
#print STDERR "Call initialize\n" ;
$self -> logger ("initialize ", $Perl::LanguageServer::jsonpretty -> encode ($req -> params), "\n")
if ($Perl::LanguageServer::debug1) ;
$Per
s goto definition support.
#definitionProvider?: boolean;
definitionProvider => JSON::true,
# The server provides Goto Type Definition support.
# Since 3.6.0
gram,
systemProcessId => $pid,
isLocalProcess => JSON::true(),
startMethod => 'launch',
}) ;
r
uageServer::DebuggerInterface ;
#use DB;
our @ISA = qw(DB);
use strict ;
use IO::Socket ;
use JSON ;
use PadWalker ;
use Scalar::Util qw{blessed reftype looks_like_number};
use Hash::SafeKeys;
#us
ax_display = 5 ;
our $debug = 0 ;
our $session = $ENV{PLSDI_SESSION} || 1 ;
our $socket ;
our $json = JSON -> new -> utf8(1) -> ascii(1) ;
our @evalresult ;
our %postponed_breakpoints ;
our $breakpoin
;
my $outdata = $json -> encode ($result) ;
use bytes ;
my $len = length($outdata) ;
my $wrdata = "Content-Length: $len\r\nContent-Type: application/vscode-jsonrpc; charset=utf-8\r\n
-> {thread_ref}) || 1,
preserveFocusHint => JSON::false (),
allThreadsStopped => JSON::true (),
}) ;
}
if (!$initia
kpoint =>
{
verified => $bp -> [2]?JSON::true ():JSON::false (),
message => $bp -> [3],
package Perl::LanguageServer::Parser ;
use Moose::Role ;
use Coro ;
use Coro::AIO ;
use JSON ;
use File::Basename ;
use v5.16;
no warnings 'uninitialized' ;
use Compiler::Lexer;
use Data::Dump qw
aio_load ($cachepath, $cache) ;
my $cache_data = eval { $Perl::LanguageServer::json -> decode ($cache) ; } ;
if ($@)
{
$self
die "open $cachepath failed ($!)" ;
aio_write ($ifh, undef, undef, $Perl::LanguageServer::json -> encode ({ version => CacheVersion, vars => $vars}), 0) ;
aio_close ($ifh) ;
}
Default debug configuration is now automatically provided without
the need to create a C<launch.json> first (#103)
=item * Add Option C<cacheDir> to specify location of cache dir (#113)
=item
t send at once from VSCode to LanguageServer
=item * Fix: cwd parameter for debugger in launch.json had no effect (#99)
=item * Fix: Correctly handle paths with drive letters on windows
=item
anguageServer usable with readonly directories.
=item * updated dependencies package.json & package-lock.json
=item * Fix deep recursion in SymbolView/Parser which was caused by function prototy