GithubHelp home page GithubHelp logo

raix / vscode-perl-debug Goto Github PK

View Code? Open in Web Editor NEW
63.0 63.0 36.0 4.53 MB

LOOKING FOR MAINTAINERS. Perl debugger extension for visual studio code

License: MIT License

TypeScript 98.85% Perl 0.84% Raku 0.30%
perl-debugger vscode-extension

vscode-perl-debug's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-perl-debug's Issues

Debug doesn't work since the last release 0.2.0

Hi,

I did the extension update and the debug of my program is not working anymore.
I have not much experience in Perl, but my program was working yesterday with the version 0.1.8.
The only error message I have is :
onException: Can't find Unicode property definition "e" in regex; marked by <-- HERE in m/^_<.*c:\Users\user\Desktop\FED\pe <-- HERE licanos.pl/
Also, is it possible to install an older version of a VSCode extension?
Thanks!

Display die() text on termination

When die() is executed, the debugger output window says "ERR>Continue error: undefined​​".

Display whatever was passed to die(). For reference, perl5db.pl currently does this:

DB<1> die "some text here"
some text here at (eval 8)[/usr/share/perl/5.22/perl5db.pl:737] line 2.

Add watch break points

It would be nice if we could tap into the ui a bit more - perl debugger supports variable / expression change breakpoints - we just need a proper way to maintain these.

Debugging applications with carton managed INCS

Hi there,

I would like to debug a Mojolicious app with this plugin, using carton as dependency manager. The end result of the debug command should be something like this:

carton exec -- perl -d ./local/bin/morbo script/myapp

Here carton would be the actual program to run, everything else is just parameters. Using carton is very convenient as it allows dependencies to live under the ./local directory of the project just like npm install under the local node_modules.

I started working towards this goal on a fork and managed to get it working using extra configuration options, something like:

{
    "exec": "carton",
    "execParams": [
        "exec",
        "--",
        "perl"
    ],
    "program": "./local/bin/morbo",
    "programParams": [
        "script/myapp"
    ]
}

The debugger was successfully launched but then paths did not match, most were duplicated and VSCode could not find them. So I decided to ask here about the scope of this plugin and if it would make sense to try to implement a feature like this.

Debug adapter process has terminated unexpectedly (read error)

Hi,
I'm getting the following message "Debug adapter process has terminated unexpectedly (read error)"
when pressing F5.
I've notice the following over the output extensions terminal
Appreciate your help

Error: This socket has been ended by the other party
at Socket.writeAfterFIN [as write] (net.js:351:12)
at StreamCatcher.nextRequest (c:\Users\mzafrany.vscode\extensions\mortenhenriksen.perl-debug-0.4.1\out\streamCatcher.js:119:28)
at StreamCatcher.resolveRequest (c:\Users\mzafrany.vscode\extensions\mortenhenriksen.perl-debug-0.4.1\out\streamCatcher.js:109:14)
at StreamCatcher.readline (c:\Users\mzafrany.vscode\extensions\mortenhenriksen.perl-debug-0.4.1\out\streamCatcher.js:95:18)
at Socket. (c:\Users\mzafrany.vscode\extensions\mortenhenriksen.perl-debug-0.4.1\out\streamCatcher.js:79:23)
at emitOne (events.js:121:20) at Socket.emit (events.js:211:7)
at Pipe._handle.close [as _onclose] (net.js:554:12)

Debugger launched but Visual Studio Code features not working

I am using Windows 10 and Perl 5.8.4. I installed the plugin on my Visual Studio Code and I tried to run the debugger. It looks like the perl debugger is run successfully, but none of the features of the plugin are working. For example, there is nothing under "Variables" or "Call Stack" and the current line is not shown in the editor.

Here I ran the debugger and clicked "Step into" a few times. You can see that the Perl Debugger is running correctly but none of the Visual Studio Code features are working:

vscode debug

Additionally, setting breakpoints has no effect. The "launch.json" is unchanged from the default generated one:

{
        "version": "0.0.6",
        "configurations": [
            {
                "type": "perl",
                "request": "launch",
                "exec": "perl",
                "execArgs": [],
                "name": "Perl-Debug",
                "root": "${workspaceRoot}\\",
                "program": "${workspaceRoot}\\${relativeFile}",
                "inc": [],
                "args": [],
                "env": {},
                "stopOnEntry": false
            }
        ]
    }

I also installed the PadWalker plugin and confirmed that is configured correctly (I am able to import PadWalker and call PadWalker functions from my code), but this did not fix the problem.

I guess it could be because my version of Perl is old, but I'm not able to use a newer version at my workplace (I'll try again later from home with the latest version).

PadWalker

I could not able to find PadWalker in the market place

Unable to get into debugger/hit breakpoints on windows 10 & ActiveState 5.24

I have a super simple perl script that prints and calls a sub, but I am unable to hit bp or anything debugger related.
Below is the info from perl -v. Is there any way I can turn on log or debug info to understand better what's the problem on my machines?

C:\Users>perl -v

This is perl 5, version 24, subversion 1 (v5.24.1) built for MSWin32-x64-multi-thread
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2017, Larry Wall

Binary build 2402 [401627] provided by ActiveState http://www.ActiveState.com
Built Jan  5 2017 02:08:02
...

C:\Users>systeminfo` | findstr /B /C:"OS Name" /C:"OS Version"
OS Name:                   Microsoft Windows 10 Pro
OS Version:                10.0.15063 N/A Build 15063

Directory mapping

It would be handy if the extension supported directory mappings, this is specially useful for remote debugging. If there's a way to help, I'd be happy to do so.

Be able to define PERL5LIB when debugging

Hi. Thank you for create the clever extension for vscode.
I hope to define PERL5LIB when debugging with vscode-perl-debug extension.
Please examining.

Best regards.

exec arguments

I see there is a inc array, seems reasonable to have another like arguments to pass to the perl program?

launch.json entry

I have installed this extension, but I don't see any entry in the launch.json that allows for the debug process to work, what are the parameters to use to make an entry in the launch.json?

Variable View, Highlighted line not showing; PadWalker installed

image
Hi there,

I'm getting similar issues to /issues/48 but I do actually have PadWalker installed. Not sure what's wrong here. If it does help, I am using WSL, and also has PadWalker installed too; and I'm not using WSL to debug here

Running Windows 10, Strawberry Perl 5.14.2, PadWalker 2.3 and VSCode 1.31.0

Any help would be great, thanks:)

No global / package variables shown

As per title

➜  framework git:(v0.1.x) ✗ code --version
1.16.1
27492b6bf3acb0775d82d2f87b25a93490673c6d
➜  framework git:(v0.1.x) ✗ perl -V
Summary of my perl5 (revision 5 version 26 subversion 0) configuration:
   
  Platform:
    osname=linux
    osvers=4.10.0-33-generic
    archname=x86_64-linux-thread-multi
    uname='linux proberts-ubu 4.10.0-33-generic #37-ubuntu smp fri aug 11 10:55:28 utc 2017 x86_64 x86_64 x86_64 gnulinux '
    config_args='-de -Dprefix=/home/peter/perl5/perlbrew/perls/alt -Dusethreads -Aeval:scriptdir=/home/peter/perl5/perlbrew/perls/alt/bin'
    hint=recommended
    useposix=true
    d_sigaction=define
    useithreads=define
    usemultiplicity=define
    use64bitint=define
    use64bitall=define
    uselongdouble=undef
    usemymalloc=n
    default_inc_excludes_dot=define
    bincompat5005=undef
  Compiler:
    cc='cc'
    ccflags ='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    optimize='-O2'
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
    ccversion=''
    gccversion='6.3.0 20170406'
    gccosandvers=''
    intsize=4
    longsize=8
    ptrsize=8
    doublesize=8
    byteorder=12345678
    doublekind=3
    d_longlong=define
    longlongsize=8
    d_longdbl=define
    longdblsize=16
    longdblkind=3
    ivtype='long'
    ivsize=8
    nvtype='double'
    nvsize=8
    Off_t='off_t'
    lseeksize=8
    alignbytes=8
    prototype=define
  Linker and Libraries:
    ld='cc'
    ldflags =' -fstack-protector-strong -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/6/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib
    libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    libc=libc-2.24.so
    so=so
    useshrplib=false
    libperl=libperl.a
    gnulibc_version='2.24'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs
    dlext=so
    d_dlsymun=undef
    ccdlflags='-Wl,-E'
    cccdlflags='-fPIC'
    lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong'


Characteristics of this binary (from libperl): 
  Compile-time options:
    HAS_TIMES
    MULTIPLICITY
    PERLIO_LAYERS
    PERL_COPY_ON_WRITE
    PERL_DONT_CREATE_GVSV
    PERL_IMPLICIT_CONTEXT
    PERL_MALLOC_WRAP
    PERL_OP_PARENT
    PERL_PRESERVE_IVUV
    USE_64_BIT_ALL
    USE_64_BIT_INT
    USE_ITHREADS
    USE_LARGE_FILES
    USE_LOCALE
    USE_LOCALE_COLLATE
    USE_LOCALE_CTYPE
    USE_LOCALE_NUMERIC
    USE_LOCALE_TIME
    USE_PERLIO
    USE_PERL_ATOF
    USE_REENTRANT_API
  Locally applied patches:
    Devel::PatchPerl 1.48
  Built under linux
  Compiled at Sep 11 2017 15:21:04
  %ENV:
    PERLBREW_FISH_VERSION="0.80"
    PERLBREW_HOME="/home/peter/.perlbrew"
    PERLBREW_MANPATH="/home/peter/perl5/perlbrew/perls/alt/man"
    PERLBREW_PATH="/home/peter/perl5/perlbrew/bin /home/peter/perl5/perlbrew/perls/alt/bin"
    PERLBREW_PERL="alt"
    PERLBREW_ROOT="/home/peter/perl5/perlbrew"
    PERLBREW_VERSION="0.80"
  @INC:
    /home/peter/perl5/perlbrew/perls/alt/lib/site_perl/5.26.0/x86_64-linux-thread-multi
    /home/peter/perl5/perlbrew/perls/alt/lib/site_perl/5.26.0
    /home/peter/perl5/perlbrew/perls/alt/lib/5.26.0/x86_64-linux-thread-multi
    /home/peter/perl5/perlbrew/perls/alt/lib/5.26.0

Tests expect @INC to include "."

Perl 5.26.0 removed . from @INC. The tests current have to be run using e.g.

PERL5LIB=. jest

Otherwise the connection.test.ts tests all fail because Module.pm cannot be found.

Error Displayed : visual studio code could not connect to debugger

I am developing in Perl and have successfully used the Perl Debug in Visual Studio Code (1.18.1) on Windows 10 in the 32 bit version using a version of Perl 5.22.2. When using the Perl debug 0.2.5 I had no problems with the debug process, displaying syntax errors and allowing code walk through. However I have just upgraded to Perl Debug to 0.4.1 and a strange issue arises.

If the Perl code has no syntax errors then the process will run successfully and as instructed stop on the first line of code to execute.
However, if there are any syntax errors in the code then the debug window will display the start information as expected
Platform : win32
Launch --- followed by the perl command in quotes
Perl --- followed by the command to process.

and Visual Studio Code will display an error message at the top of the screen stating:
ERROR : visual studio code could not connect to debugger

Running the same Perl command in a Windows Dos command window shows the syntax error as expected, which would normally be displayed in the debug output window of Visual Studio Code.

On removing Perl Debug 0.4.1 and going back to a backup copy of Perl Debug 0.2.5, the process works as expected. The Debug window displays the same first 3 lines of information, followed by the DB loading information and then the error message that there is a syntax in the expected line.

Is there anything that I need to change to get 0.4.1 to work or should it just work exactly like 0.2.5, or are there any other pre-requisites that I may be missing.

I have tried upgrading to VS Code 1.20 in 32 bit and in 64 bit and still get the same error, hence the regression to VS Code 1.18 and Perl Debug 0.2.5 as that seems stable for Perl 5.22.2 development.

Thank you
Mark

Debugger not moving to next line

I am using Mojolicious Framework. When the server is started the debugger starts and do not respond/proceed to "Next Step" and hangs on there. Any Idea ?
image
image

Relax exceptions "redefine"

We might want to warn instead throwing an exception

  • onException: Subroutine ... redefined

Need to investigate further

Add depedency checks

Have vs code notify the user if we are missing dependencies

  • PadWalker module is required for variable inspection
  • perl

Path resolution for stepping into gives wrong paths.

If i want to step into a method not in the currently used module, the debugger tries to resolve the path to the required module. However it always prepends the path of the current working directory to the module which the results in something like:

e:\C:\Strawberry\perl\lib\perl5db.pl which is obviously wrong.

The working directory here is just e:\ . If i change the working directory to e:\Temp then it prepends:

e:\temp\C:\Strawberry\perl\lib\perl5db.pl

This issue is probably related to the 'can't find 'perl5db.pl' issue as in one of the comments the same path resolution was described.

Debug very SLOOOOOW

Hi,

I'm new in Perl and I want to use Exiftool library.

I write a small program, less than 200 lines, and when I try to debug my program, I must wait dozen of second after each step.
When I remove a brakpoint, it is always active.

What happens ?

Create a low level test suite

It might be a good idea to actually test the perl5db IO directly. We might be able to use jest snapshots for the ease of it.

The reason for doing this test suite is to:

  • verify in detail what the IO of the debugger is on different systems. We might have to add an abstraction layer to smooth out lacking features and inconsistencies.
  • make it easier for the community users to run the test suite on their system.

An idea could be to use the vs code extensions error reporting tool - we might even be able to run the test suite on new installations, making sure the system is compliant - if not the report to the user and vs code thing. (need to investigate further)

We could also publish the test suite on npm - then if users encounter issues they can run the test suite and paste in the result in a github issue?

Unable to debug with autogenerated launch configs

I have below auto-generated launch.json configs.

{
    "version": "0.0.2",
    "configurations": [{
       "type": "perl",
        "request": "launch",
        "exec": "perl",
        "name": "Perl-Debug",
        "root": "${workspaceRoot}/",
        "program": "${workspaceRoot}/${command.AskForProgramName}",
        "inc": [],
        "stopOnEntry": true
    }]
}

I have a simple file within workspaceRoot named as testPerl.pl and its contents are as below.

$p="Welcome to perl\n";
print $p;

print "What is your name?\n";
my $name=readline STDIN;
chomp($name);
print "Welcome $name\n";

But no matter what, I am not able to debug this file even after placing debuggers. It doesn't throw any error, it doesn't logs/prints anything. It just starts and stops.

I have also tried to update "program" values to "program": "${workspaceRoot}/test.pl", and "program": "${workspaceRoot}/${relativeFile}", but did not make a way to run it successfully.

Screenshot attached for a reference to workspaceRoot structure.

image

How could I possibly debug this file? Any other things I need to try?

Breakpoints vs relative paths

The Perl debugger seems to have a rather simplistic path lookup mechanism. When you have something like

BEGIN {
  use lib './foo/bar';
  ...
}

then the Perl debugger f command is unable to switch to files under foo/bar using their absolute paths. So when you try to set a breakpoint in vscode in files there, this extension currently issues f <absolute path> which then fails to set a breakpoint.

x $INC{'Grammar/Graph2.pm'}
0  'Grammar-Graph2/lib/Grammar/Graph2.pm'
f /home/.../Grammar/Graph2.pm
No file matching '/home/.../Grammar/Graph2.pm' is loaded.

Perhaps this could be addressed by looking at the output of the M command or by checking %INC or by looking at the error message given by f and perhaps re-trying with an abbreviated path or a combination thereof.

can't find 'perl5db.pl'

I'm trying v0.1.6 on Visual Studio Code 1.9.0 for Mac OS.

I can't debug anything I always get errors of this kind (it happens with lots of modules):

Can't open 'perl5db.pl': File not found (/Users/toshiro/projects/test/ptab/System/Library/Perl/5.18/perl5db.pl).

Obviously, this path does not exist (I think it's joining both the work directory '/Users/toshiro/projects/test/ptab' with the system perl location 'System/Library/Perl/5.18'

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

VSCode is no longer supporting specifiying a commandId in the "initialConfigurations" contribution

Hi,

We noticed your extension in package.json is using a "initialConfigurations" contribution in a deprecated way by specifiying a command id.
We wanted to let you know that we plan to delete support for this specific use of "initialConfigurations" soon.
More about this deprecation can be found here and in our release notes.
A good example on how to use the DebugConfigurarationProvider which is the new way of doing this can be found here

Also note other deprecations which are specified in our release notes (which can be found on our site).

Kind regards,
Isidor from the VSCode team

Regex exception when debugging a file in folder under the root of project

What I did:

  1. I open VS Code in folder e:\Projects\_Playground\perl
  2. I generate launch.json automatically and don't change anything in it.
  3. I create a file main.pl with some simple content ($test = 'a';) directly in perl folder.
  4. I try to debug this script and it works as expected.
  5. Now I create a folder src inside perl and move main.pl into it.
  6. When trying to debug i get the following output:
Loading DB routines from perl5db.pl version 1.49_05
Editor support available.
Enter h or 'h h' for help, or 'perldoc perldebug' for more help.
main::(e:\Projects\_Playground\perl\src/main.pl:1):
1:	$test = 'a';
onException: Can't find Unicode property definition "r" in regex; marked by <-- HERE in m/^_<.*e:\Pr <-- HERE ojects\_Playground\perl\src\main.pl/

Debugging stops after that.

I'm using Windows 10 with Strawberry Perl v5.24.1 built for MSWin32-x64-multi-thread.

variables not shown in variable explorer when debugging

Unfortunately there are variables shown in the variable explorer when debugging, while hovering over each one reveals the current value. Is this a bug or rather a config issue and I have missing something? @raix Or is this rather an interface issue of the perl debugger you are alluding to in the ReadMe.md?

I am degugging the sample perl snips used in the nice video teaser.

VS Code 1.19.3 / Perl-Debug 0.2.5 / Windows 64bit - Strawberry perl 5.26.1 and ...

// launch.json
{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "perl",
            "request": "launch",
            "exec": "C:/strawberry-perl/perl/bin/perl.exe",
            "execArgs": [],
            "name": "Perl Debug",
            "root": "${workspaceRoot}/",
            "program": "${workspaceRoot}/${relativeFile}",
            "inc": ["."],
            "args": [],
            "stopOnEntry": true
        }
    ]
}

Remote debugging

Is it possible to set up the extension for remote debugging? Currently I use Eclipse IDE with the EPIC extension, but would prefer using VS Code if possible since the Eclipse experience is a bit cumbersome. On the remote machine I use the PERLDB_OPTS environment variable with the RemotePort option.

Miscellaneous behavior of the script when setting a breakpoint

Hello, I'm Russian, used Google translator.
When I set the breakpoint in the script, the script stops working.

There is a suspicion that this is due to the fact that the file from the disk is not correctly read, the last line from the file is read, here is the code:

sub OpenAndReadFile() {
    my ($fileName) = @_;
    die "Ошибка открытия файла $fileName" unless open my $FH, "<:encoding(utf8)", $fileName;      
    my $txt;
    {
        local $/ = "\r";
        $txt = <$FH>;
    }
    close $FH;
    return $txt;    
}

gif:
https://ibb.co/deBGSe

Debug not working with NYTProf active

Error Could not connect to debugger, connection closed was reported in the debug console.

Steps to reproduce:
OS: Windows10 64bit
Dist: ActiveState Perl v5.24.1 (MSWin32-x86-multi-thread-64int)
Environment: PERL5OPT=-d:NYTProf

Deleting the environment variable fixed the issue.

local variables not showing up correctly

When debugging it seems that variables from the calling function show up, not the variables that are available in the current scope. For example, suppose I have a simple script like this:

my $test1 = 29;
my $test2 = 30;

my $result = Foo::add($test1, $test2);
say "result is $result";

When I am debugging in the main body of the script, Variables -> Local shows nothing. But then when I step into Foo::add, all of a sudden $test1 and $test2 do show up under Variables -> Local. It seems that the call to fetch the variables is using the wrong level, or something along those lines.

I also recorded a 40 second video to illustrate what I mean: https://vimeo.com/282946315

Thanks for your efforts by the way, it is handy to debug under VS Code.

launch.json problems

I have VS 1.12.2 on Win10 x64.
I installed the debugger and I am experiencing the following issues:

  • out of the box, I am asked to create a configuration.
  • I have no idea how this thing works, so without too much thinking, I changed the code like this:

{
"version": "0.2.0",
"configurations": {
"version": "0.0.5",
"configurations": [

        {
            "type": "perl",
            "request": "launch",
            "exec": "C:\\Perl\bin\\perl.exe",
            "execArgs": [],
            "name": "Perl-Debug",
            "root": "${workspaceRoot}/",
            "program": "${workspaceRoot}/${relativeFile}",
            "inc": [],
            "args": [],
            "stopOnEntry": true
        }
    ]
}

}

  • After this, I get the error:
    t.configurations.filter is not a function

And I can't debug ...

Any ideas?

Which perl on windows?

What version of Perl are you using?

I'm not a VS Code expert by far, but so far, I got this plug-in to work only with cygwin perl (I'm running Windows 10, BTW, and my cygwin is the 64 bit variety).
Even there it will step through code, but it won't let me examine variables.
Did I misunderstand that variables don't work in mouse hover mode, but should appear in the 'variables' and 'watch' panes? The variables pane just remains empty, and adding anything in the watch pane doesn't give the expected result.

With ActiveState Community Perl 32 bit, it looks like the perl.exe executable is started, but no output from it ever reaches the debugger. I tried ActiveState 64 bit with the same visible result (i.e. nothing), but I didn't check if perl.exe was launched in that case.
Both versions did work fine at a command prompt though.

With Strawberry Perl 64 bit, some output reached the debugger, but it was all error messages about not being able to determine the console window size and such, and it never reached the first breakpoint in the Perl code I was debugging (just a small test, barely above "hello world" functionality).

Does anyone have an idea of anything that might be tried to get around these problems?

Release stage runs on PRs

If you set if: branch = master, the release stage will run on PRs, because PR builds are run on the virtual merge commit on master. You can be safe with if: branch = master AND type = push AND fork = false

Printing to STDERR vs $DB::OUT

This does not and probably cannot work with remote debugging:

	async getVariableReference(name: string): Promise<string> {
		const res = await this.request(`print STDERR \\${name}`);
		return res.data[0];
	}

	async getExpressionValue(expression: string): Promise<string> {
		const res = await this.request(`print STDERR ${expression}`);
		return res.data.pop();
	}

It seems to me that this should instead be

print { $DB::OUT } ...

to make sure it does not interfere, as much as possible anyways, with the debuggee, and actually ends up on the socket when using remote debugging.

Fix variable inspection in windows

For some reason theres inconsistent output format by the debugger - it would be nice if we could get it out in a proper format.

Theres also an odd case in some versions of perl on linux: https://github.com/raix/vscode-perl-debug/blob/master/src/adapter.ts#L426-L427

We might be able to make https://github.com/raix/vscode-perl-debug/blob/master/src/variableParser.ts#L133 fix output errors - or have a separate function for it.

https://github.com/raix/vscode-perl-debug/blob/master/src/tests/connection.test.ts#L223-L228

Fix perl5db.pl reference on error

The stack trace file is resolve wrongly - we should add a proper file resolver that looks up files / modules in @INC etc.

For now it will not be able to open the perl5db.pl code

Calling warn stops the debugger

When you have Perl code doing something like

warn "foo";

you get

onException: fooDebugger connection closed

upon hitting the warning.

I gather this is due to code marked with xxx.

Incomplete filename regex

export const fileMatch = /^[a-zA-Z]+::\(([a-zA-Z\._-]+):([0-9]+)\):/;
export const fileMatchException = /at ([a-zA-Z\._-]+) line ([0-9]+)\./;

Shouldn't filename regex include digits as well? Also it seems that it won't match neither full nor relative paths.
Also it won't match nested namespaces like AA::BB::CC::.

VS Code debug feature not working on Centos

Hi,

I'm running the following

  • Centos 7.6.1810
  • VS Code 1.30.1
  • Perl 5.16.3
  • PadWalker 2.3

I'm using the default launch.json.

image

When I try to debug a pl file I get the same behavior that was reported in issue 31 (#31) .

If I open the debugger console I can see that my breakpoints are being hit but the VS Code debugger windows don't show anything. Variables, Watch, and Call Stack are always blank. In addition pressing buttons on the debugger toolbar does nothing. I have to interact directly with the debugger via the console to debug stuff.

Is there anything I can do to diagnose/fix this?

Trevor

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.