Komodo 10 not able to debug mod_perl remotely on Mac

I am using Komodo 10 in Mac OSX. I want to be able to debug mod_perl running remotely on my virtual machine (CentOS). I have followed exactly all the steps in this guide: http://docs.activestate.com/komodo/4.4/debugperl.html. Apache::DB was successfully initialised and the Komodo IDE received a connection when I opened the browser. (see screenshot below)

Below is my configuration (httpd.conf):
<Perl>
use ModPerl::Registry;
use lib qw(/home/tuan.nguyen/sf_perllib);
$ENV{PERLDB_OPTS} = "RemotePort=192.168.1.106:12345 LogFile=stderr";
use Apache::DB ();
Apache::DB->init;
</Perl>

Location configuration:
<Location ~ "^/(?|$|secure)">
SetHandler perl-script
Options +ExecCGI
PerlFixupHandler Apache::DB
PerlResponseHandler HVE::Affinity
</Location>

Break points:

Nothing happened when I accessed a page in the browser.
I started Apache in debug mode using:
sudo httpd -k restart -X

Am I missing anything?

First off, you’re looking at the version 4 documentation whilst using version 10. Please reference the latest documentation:

http://docs.komodoide.com/Manual/debugperl

Looking at your post the part that looks like it might be wrong is your httpd restart command. Check the --help and ensure that you can pass -X after restart, you might have to put it in front.

Also, is Apache actually serving Perl pages properly? Judging by that location regex it won’t do much unless you’re at the root of the domain or inside a /secure path.

Thanks, however, the order of -X argument is not important. And also there is not much difference between the version 4 documentation and version 10 one. And yes, i am accessing the root of the domain

Believe it or not that’s not always the case, which is why I suggested that.

Is the machine running Perl the same machine as the one you are running Komodo on? If so you could try using 127.0.0.1 to eliminate any networking issues as the cause of the problem.

Yes, I changed the order of -X argument as well but no success. And since the debugger received a connection every time I access the page, I dont think network is an issue. It just does not stop at the set breakpoints. Is there anything else that I need to do?

Oh it IS receiving a connection? In that case it’s most likely a mapping issue, try configuring your mapping (ie. local file vs what it looks like on the remote server) via Preferences > Mapped URIs.

Documentation on this subject:

http://docs.komodoide.com/Manual/debugger#debugging-programs-komodo-ide-only_remote-debugging_mapped-uris-for-remote-debugging

Still does not work. This is the error in the log:

[2017-09-15 20:10:41,927] [ERROR] dbgp.server: session cmdloop exception - sending session stop command
Traceback (most recent call last):
  File "/Applications/Komodo IDE 10.app/Contents/Resources/python/komodo/dbgp/serverBase.py", line 66, in _cmdloop
    self._handleIncoming()
  File "/Applications/Komodo IDE 10.app/Contents/Resources/python/komodo/dbgp/serverBase.py", line 167, in _handleIncoming
    self._dispatch(size,response)
  File "/Applications/Komodo IDE 10.app/Contents/Resources/python/komodo/dbgp/server.py", line 808, in _dispatch
    self._responseHandler(root)
  File "/Applications/Komodo IDE 10.app/Contents/Resources/python/komodo/dbgp/server.py", line 1094, in _responseHandler
    raise DBGPError('response without a transaction id')
koDBGPError: -1 (response without a transaction id)
Exception in thread dbgp server cmdloop:
Traceback (most recent call last):
  File "/Applications/Komodo IDE 10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.7/threading.py", line 808, in __bootstrap_inner
    self.run()
  File "/Applications/Komodo IDE 10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.7/threading.py", line 761, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/Applications/Komodo IDE 10.app/Contents/Resources/python/komodo/dbgp/serverBase.py", line 77, in _cmdloop
    self._dispatch(len(msg), msg)
  File "/Applications/Komodo IDE 10.app/Contents/Resources/python/komodo/dbgp/server.py", line 808, in _dispatch
    self._responseHandler(root)
  File "/Applications/Komodo IDE 10.app/Contents/Resources/python/komodo/dbgp/server.py", line 1094, in _responseHandler
    raise DBGPError('response without a transaction id')
koDBGPError: -1 (response without a transaction id)

@mitchell any idea?

Hi, you can try the following:

  1. Make sure there is no debug session open.
  2. Remove all breakpoints.
  3. Under Edit > Preferences > Languages > Perl > Debugger Logging, check the checkbox and set a debug path. (Make a note of this path.)
  4. Restart Komodo.
  5. Set your breakpoints.
  6. Initiate the remote debugging session by opening your page.
  7. Attempt to perform the action that should trigger your breakpoint (submit a form, click a link, etc.; whatever it is).
  8. Navigate to the debug log path you set in your preferences in step 3 and try to attach that file here.

Thanks!