Skip to content

Help: How to debug perl script from browser #2127

@simonschaufi

Description

@simonschaufi
  • IDE: Phpstorm 2019.3
  • Perl5 plugin version: 2019.3
  • JRE version: openjdk version "1.8.0_222"
  • Ubuntu 18 LTS
  • Also installed Devel-Camelcadedb with sudo cpan Devel::Camelcadedb

I browsed through the wiki (https://github.com/Camelcade/Perl5-IDEA/wiki/Perl-Debugger) and all the issues that are related to debugging and couldn't find anything helpful on how to setup browser debugging. Debugging within the IDE works fine but I have no idea how to configure my system in order to call http://localhost/cgi-bin/test.cgi and debug the test script which looks like this:

#!/usr/bin/perl
print "content-type: text/html\n\n";
print "Hi";
exit;

I use nginx with fcgiwrap and the following config:

server {
    ...

    location /cgi-bin/ {
        gzip off;

        fastcgi_pass unix:/var/run/fcgiwrap.socket;

        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }

    ...
}

The script is executed without problems and I can see "Hi" in my browser.

What do I need to do in order to debug this script when called from the browser? This is just a test script but later on I want to debug a whole perl application.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions