raix / vscode-perl-debug

LOOKING FOR MAINTAINERS. Perl debugger extension for visual studio code
MIT License
63 stars 35 forks source link

How to make mojolicious run on the debugger #129

Open dblanch opened 5 years ago

dblanch commented 5 years ago

I can't put breakpoints visually. At the begining yes, it works, but latter it does not. I'm able to stop / add breakpoints using $DB::single = 1; from there I can use the debugger.

Here is my configuration:

    {
        "type": "perl",
        "request": "launch",
        "name": "Mojolicious",
        "program": "${workspaceRoot}/script/xmedia_lite.pl",
        "exec": "perl",
        "execArgs": [],
        "root": "${workspaceRoot}/",
        "inc": [],
        "args": ["daemon"],
        "env": {},
        "stopOnEntry": true,
    },

$uname -a Darwin Korova.local 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64 $perl -v

This is perl 5, version 26, subversion 0 (v5.26.0) built for darwin-2level (with 1 registered patch, see perl -V for more detail)

Copyright 1987-2017, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page.

raix commented 5 years ago

@dblanch ok - so can I conclude that we just need to exec $DB::single = 1 on startup?

We already do that at: https://github.com/raix/vscode-perl-debug/blob/8778e42e4f3b85f9732d82d9559a38eda61095b0/src/adapter.ts#L837 not sure why that isn't working