Go to file
Tomas Cohen Arazi 80de9fa97c Bug 18964: Add --debugger option to koha-plack
CAVEAT: This patch is only about allowing koha-plack to start a debugging
session on a remote target. Configuring all the needed pieces to make it
work is out of the scope of the bug. Testing should be focused (mainly) on
making sure this introduces NO REGRESSIONS on regular use (i.e. not debugging).

This patch adds the following option switches to koha-plack:

--debugger
----------
Toggle debugging

--debugger-key
--------------
Some IDEs require a key, this needs to match because they are picky about it

--debugger-location
-------------------
This option switch is used to specify the host:port your IDE is listening at.
Inside kohadevbox (using Vdebug with Vim) this would be localhost:9000. Outside
kohadevbox it would be 192.168.50.1:9000

--debugger-path
---------------
This is the path in which you installed the Komodo Remote Debugger library [1]. In kohadevbox
you could put the contents of the downloaded .tar.gz in /home/vagrant/dbgp/perllib. That
perllib seems to be required for things to work [2].

You can test with a simple CLI script things work:

PERL5LIB=/home/vagrant/dbgp/perllib:$PERL5LIB \
PERLDB="BEGIN { require q(/home/vagrant/dbgp/perllib/perl5db.pl) }" \
PERLDB_OPTS="RemotePort=192.168.50.1:9000" perl -d t/Prices.t

If you see action on your IDE, you are on the right track on the IDE side.

To test:
- Apply this patch
- Enable remote debugging on your IDE, on port 9000 (or adjust the command
  below to match your IDE's listening port).
- Download the Komodo Remote Debugger package, and place the package's contents
  in /home/vagrant/dbgp/perllib (you should see perl5db.pl in there).
- Run:
  $ sudo koha-plack --stop kohadev
  $ sudo kohaclone/debian/koha-plack --start \
                                     --debugger \
                                     --debugger-path /home/vagrant/dbgp/perllib \
                                     --debugger-location 192.168.50.1:9000 \
                                     kohadev
=> SUCCESS: You IDE/tool gets a connection from the Plack process.
- Sign off :-D

The explanation on how to use it assumes you are running kohadevbox.

WARNING: The main difficulty I found was setting the right dir/file mappings.

[1] http://code.activestate.com/komodo/remotedebugging/
[2] https://github.com/Komodo/KomodoEdit/issues/644#issuecomment-236268012

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-01-23 16:05:54 -03:00
C4 Bug 19971: Typo in the comments of parseQuery routine 2018-01-19 15:50:31 -03:00
Koha Bug 18477: Populate article_requests table values for AR_PENDING notices 2018-01-23 16:03:13 -03:00
OpenILS
…
acqui Bug 19839: Removed Warning (invoice.pl - uncertainprices) 2018-01-19 15:50:30 -03:00
admin Bug 19977: Open only .pref files in Local Use tab (sysprefs) 2018-01-19 15:13:24 -03:00
api/v1 Bug 19410: (follow-up) Add reserved params definitions 2017-12-11 17:46:59 -03:00
authorities Bug 20063: (bug 18811 follow-up) Allow hidden $9 subfields 2018-01-22 13:44:42 -03:00
basket Bug 19040: Refactor GetMarcBiblio parameters 2017-08-25 10:23:42 -03:00
catalogue Bug 19807: Make IntranetCatalogSearchPulldown honor IntranetNumbersPreferPhrase 2018-01-02 12:58:55 -03:00
cataloguing Bug 19987: If no z39.50/SRU servers the button should not show 2018-01-19 15:13:32 -03:00
circ Bug 19921: Fix update child when only one adult patron category exist 2018-01-15 12:13:59 -03:00
clubs Bug 18632: Remove 'CGI::param called in list context' warnings 2017-05-28 22:25:22 -04:00
course_reserves Bug 19231: No need to pass the size to the template 2017-10-27 16:05:55 -03:00
debian Bug 18964: Add --debugger option to koha-plack 2018-01-23 16:05:54 -03:00
docs Bug 7143: Update about page for new dev - Zoe Bennett 2018-01-19 16:10:18 -03:00
errors Bug 15288: Error pages: Code duplication removal and better translatability 2016-01-27 05:57:34 +00:00
etc Bug 17951: (follow-up) Make Makefile.PL handle template_cache_dir config 2017-12-22 13:15:39 -03:00
ill Bug 7317: Display all the libraries, not only one 2017-11-09 13:31:10 -03:00
installer Bug 19831: Turn on EnhancedMessagingPreferences by default for new installations 2018-01-22 13:47:14 -03:00
koha-tmpl Bug 7143: Update about page for new dev - Zoe Bennett 2018-01-19 16:10:18 -03:00
labels Bug 19681: Correct result count formatting 2017-12-07 09:37:10 -03:00
members Bug 19921: Fix update child when only one adult patron category exist 2018-01-15 12:13:59 -03:00
misc Bug 18071: (QA follow-up) Rename commit to confirm parameter 2018-01-10 16:53:52 -03:00
offline_circ Bug 19771: Fix crashing in pending offline circulation actions list 2018-01-19 15:13:04 -03:00
opac Bug 20068: Check if user logged in before passing dashboard params to template 2018-01-23 09:33:29 -03:00
patron_lists Bug 16154: CGI->multi_param - Force scalar context 2016-04-26 23:16:43 +00:00
patroncards Bug 18541: (QA follow-up) Fix wrong variable name ($layout_xml vs $print_layout_xml) 2017-09-19 11:47:32 -03:00
plugins Bug 19088: plugins-upload causes error log noise 2017-08-30 15:05:56 -03:00
reports Bug 19669: (QA follow-up) Remove itemstypes.plugin 2017-12-21 13:07:11 -03:00
reserve Bug 19300: Replace C4::Reserves::OPACItemHoldsAllowed 2018-01-02 11:46:39 -03:00
reviews Bug 19808: Handle deleted reviewers gracefully - reviews/reviewswaiting.pl 2017-12-21 11:07:37 -03:00
rotating_collections Bug 15758: Koha::Libraries - Remove GetBranches 2016-09-08 14:36:03 +00:00
serials Bug 19315: Prevent crash if no items and not library set for the subscription 2017-12-21 10:51:03 -03:00
services Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
skel
…
suggestion Bug 18399: Add reasons in edit suggestion page 2017-10-11 13:05:39 -03:00
svc Bug 19536: Odd number of elements in anonymous hash in svc/bib 2017-11-26 13:15:58 -03:00
t Bug 19985: Make TestBuilder.t pass even if default_circ_rules is not empty 2018-01-23 16:05:54 -03:00
tags Bug 19040: Refactor GetMarcBiblio parameters 2017-08-25 10:23:42 -03:00
test Bug 9819 - 'stopwords'-related code removed 2015-12-30 15:49:35 +00:00
tmp/modified_authorities
…
tools Bug 19585: Inventory: Allow additional separators in a barcode file 2018-01-19 15:50:32 -03:00
virtualshelves Bug 17214: Add records to lists by biblionumber 2017-10-27 14:10:26 -03:00
xt Bug 19262: Remove xt/author/pod_spell.t 2017-09-12 11:30:07 -03:00
.editorconfig
…
.htaccess
…
.mailmap Update mailmap - Jonathan Druart 2017-06-21 12:42:19 -03:00
INSTALL Bug 17626: Remove existing install instructions and link to the wiki pages instead 2016-11-22 11:29:07 +00:00
Koha.pm Bug 17682: DBRev 17.12.00.006 2018-01-19 15:50:30 -03:00
LICENSE
…
MANIFEST.SKIP
…
Makefile.PL Bug 17951: (follow-up) Make Makefile.PL handle template_cache_dir config 2017-12-22 13:15:39 -03:00
README
…
README.md Bug 15465: Fix typo in bugs.k-c.org 2017-05-26 11:45:31 -03:00
README.robots
…
about.pl Bug 19542: (QA follow-up) Remove debug warn 2017-12-11 14:30:42 -03:00
changelanguage.pl Bug 16776: Do not forget external language choice in language switcher 2016-08-10 13:51:33 +00:00
edithelp.pl Bug 16447: Remove occurrence of the borrow permission which does no longer exist 2016-05-05 21:28:14 +00:00
fix-perl-path.PL Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
help.pl Bug 16724: Fix link to the online documentation links 2016-06-24 12:00:42 +00:00
install-CPAN.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
koha_perl_deps.pl Bug 17990: Refactor Perl module versions check 2017-02-17 12:13:44 +00:00
kohaversion.pl Bug 13758: Move the Koha version from kohaversion.pl 2015-05-07 11:39:04 -03:00
mainpage.pl Bug 18432 : Follow up - Updating to use they/them 2017-04-21 10:56:43 -04:00
rewrite-config.PL Bug 17951: (follow-up) Make Makefile.PL handle template_cache_dir config 2017-12-22 13:15:39 -03:00

README.md

Koha is a free software integrated library system (ILS).

Koha is distributed under the GNU GPL version 3 or later.

Note: This is a synced mirror of the official Koha repo.

Note: Koha does not accept pull requests from git hosting sites.

Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.

For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch

The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook

http://koha-community.org/

Koha Logo