Starting with eXist-db release 1.4 the database provides an facility to debug xquery code on the server. This document descibes how to build this extension, and how to configure your editor to work with the extension.
The following steps are required to enable the debugger interface:
Enable the debugger in extensions/build.properties: set include.feature.debugger to true.
Download the required jar files.
Recompile eXist-db:
Currently two editors can use the debugger interface: Emacs and VIM.
First you need to install geben. When installed you can start geben with "Meta-x geben"
Run your XQuery script in the debug mode: http://www.example.com/script.xql?XDEBUG_SESSION_START or you can use the Xdebug Helper add-on for Firefox.
If every thing was done correct you should see script.xql. Available commands are:
spc |
step into/step over |
---|---|
i |
step into |
o |
step over |
r |
step out |
b |
set a breakpoint at a line |
u |
unset a breakpoint at a line |
g |
run |
q |
stop |
To debug with vim you have to install the remote debugger interface for the DBGp protocol. In the editor you can press <F5> and browse xquery file in debug mode within 5 seconds