Perl5-IDEA icon indicating copy to clipboard operation
Perl5-IDEA copied to clipboard

Suggestion to make Root Path Setup easier

Open dedeibel opened this issue 9 years ago • 6 comments

Hi,

I had problems setting up the root path for remote debugging since I didn't know what part of the path is used as relative part.

After doing some experiments I noticed, that I had to add the root directory of my Perl files as first directory of the IntelliJ project and had to reimport it. Before that it was on level above so I could add and edit other files too.

I would be cool to preview the handling of the remote path. Or enable some way to debug it.

I actually found some commented out printf in the code I activated to find my problem, but I would hope not everybody needs to do this.

You get little feedback aside from that the breakpoints are not working and you are very unsure what the problem might be when you are initially setting up the debugger.

I recently set up debugging for PHP and got an idea to make the root path setup easier. See the screenshots below. A more sophisticated but obviously extended solution would be to have a more complex configuration dialog like the one from PHP.

Perl:

debug-setup

Php:

php-debug-config

dedeibel avatar Jul 22 '16 10:07 dedeibel

The problem here is that php using remote access, which available only in ultimate idea/php storm. And not available in community edition. Plugin atm available everywhere. But i guess it would be nice to have more comfortable behaviour in Ultimate.

hurricup avatar Jul 22 '16 10:07 hurricup

Requires #1823

hurricup avatar Feb 21 '19 17:02 hurricup

@hurricup

I'm still confused on configuring this part. I'm testing a Perl script on a vm. The script on the vm is located at /data/cron/mailQueue_nightly. The script on my local machine where I'm using PhpStorm to debug is located at X:\cron\mailQueue_nightly.pl (on Windows).

Using Stop after compilation works, but Stop at first breakpoint doesn't. What should I set remote project root to so I can use breakpoints?

jacobalvareztcs avatar Jun 16 '22 21:06 jacobalvareztcs

Your project root should be x:\cron and remote project root /data/cron This way debugger will be able to map paths and work properly. Basically, any file in the project should have same relative path. Locally to local root, and remotely - to remote root.

hurricup avatar Jun 17 '22 05:06 hurricup

@hurricup I tried your suggestion and it still doesn't work

jacobalvareztcs avatar Jun 20 '22 13:06 jacobalvareztcs

do you have a problem debugging particular project? Have you tried just a simple hello world script? Some frameworks may use tricky stuff preventing debugger from working properly.

hurricup avatar Jun 21 '22 04:06 hurricup