Setting breakpoints before starting remote debug.

105 views
Skip to first unread message

Casey Motherway

unread,
Feb 7, 2017, 7:08:54 PM2/7/17
to Camelcade - Perl plugin for IntelliJ IDEA
First off, I just want to say: Thank You to Alexandr!  I've been developing Perl code for a while now without a real IDE, and it is really nice to be in an IDE again, and be able to step into a debugger.

Onto the topic.  I have remote debugging working in my current IDE setup.  With the way I have things configured I edit files on my laptop, and have a SFTP deployment push files to a remote test machine.  When I want to debug:
  • I launch my "debug" run configuration
  • select my remote machine
  • an external tool launches the perl process on the remote machine (ssh session that nohup's the perl process and returns without the terminal killing the process)
  • my IDE connects to the perl process
At this point, instead of the debugger breaking into the (local) file that I have open, it opens the file from the remote machine and breaks there.  And if I then step into code, that exists in a second file, it opens the second file from the remote machine (instead of using my local copy), and so on.  This means that I have to wait for these files to open in order to set breakpoints.  Obviously this is not as efficient as just setting breakpoints in local files and launching the debugger.

I am hoping that I have something wrong in my configuration.  Is it possible, when remote debugging, to have the debugger use the local copies of files instead of opening the remote files?

Casey Motherway

unread,
Feb 8, 2017, 4:15:31 PM2/8/17
to Camelcade - Perl plugin for IntelliJ IDEA
Alexandr thank you for your reply.  Adding it for others to see:

On Tue, Feb 7, 2017 at 11:37 PM, Alexandr Evstigneev wrote:
Hi there!

Yes, for this you should configure remote project root in the remote debugging configuration. See https://github.com/Camelcade/Perl5-IDEA/wiki/Perl-Debugger
Basically, you need to know perl how to map remote files to the local ones.

After getting your reply, I took a deeper look at my configuration.  I also added a print statement to /usr/local/share/perl5/Devel/Camelcadedb.pm to see why my path was not matching up and was able to figure it out and I have it working now.  So nice to be able to debug without Data:Dumper!!!  Thank you again Alexandr!
Reply all
Reply to author
Forward
0 new messages