Komodo IDE and Koha

This page is meant for all developers working actively with source code, and want to use Komodo IDE as their preferred development environment.


If you are running a Koha development instance inside an LXD container, you should setup a direct access to the container's filesystem from host so that you can edit Koha source files directly from the host.

Install lxd-functions

This great tool allows you to mount the container filesystem with appropriate rights and ownership. After that the container is started, you can work directly on the host machine, your user is used in the mounted point, and you have full access to it. In the container, a default user is used to map with the host user.

Start your container

lxd-start containername

Observe mounted container and file ownership

ls -lha /var/lxd/containername

Files should now be owned by your host's user.

Configuring the project

Create a new project

It is preferred to save the project file to the root of the Koha/-directory.

Configure project

Add environment variables

Add mapped URIs

Add additional Perl import directories

You may also need to add other Perl module directories. Go to your container and execute this command:

perl -e 'print "$_\n" for @INC;'

Add these locations to the additional Perl import directories.

Space over tab characters

Configuring the debugging environment

Hint: Set directory structure to dbgp/perllib (so that is located at e.g. "/home/koha/dbgp/perllib/" in order to avoid unwanted breaks (see:


(inside your container)
su koha
cd ~
mkdir -p dbgp
cd dbgp
tar -xzf Komodo-PerlRemoteDebugging-12.0.1-91869-linux-x86_64.tar.gz
mv Komodo-PerlRemoteDebugging-12.0.1-91869-linux-x86_64 perllib

Set debugging listener port

Remote debugging basic Perl scripts on remote hosts

  • Put this script to your Koha/-directory and name it
    echo "Remember to run this like" 
    echo "  ." 
    echo "Not! " 
    echo "./" 
    export PERL5LIB=/home/koha/dbgp/perllib:$PERL5LIB
    export PERLDB_OPTS=RemotePort= async=1
    export DBGP_IDEKEY=1234

where is your host IP (the machine where Komodo IDE is running). If you are using LXD, get your host container IP with this command inside LXD container

ip route show default | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | head -1

  • Source it to your bash environment
  • Then you can remote debug just by running scripts with the -d -flag. Eg:
    ..~/Koha$ perl -d misc/cronjobs/


#!/usr/bin/perl -d

Then navigate to the page and a remote debbuging session should start

Extend this wiki-page if more issues arise.