-
-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathdebugger.xml
More file actions
114 lines (99 loc) · 4.39 KB
/
debugger.xml
File metadata and controls
114 lines (99 loc) · 4.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<?xml-model href="http://docbook.org/xml/5.0/rng/docbook.rng"
schematypens="http://relaxng.org/ns/structure/1.0"?><?xml-model href="http://docbook.org/xml/5.0/rng/docbook.rng" type="application/xml"
schematypens="http://purl.oclc.org/dsdl/schematron"?><article xmlns="http://docbook.org/ns/docbook" version="5.0">
<info>
<title>Debugger</title>
<date>1Q18</date>
<keywordset>
<keyword>xquery</keyword>
</keywordset>
</info>
<!-- ================================================================== -->
<para>eXist-db provides a facility to debug XQuery code on the server. This document describes how to build and use this extension.</para>
<!-- ================================================================== -->
<sect1>
<title>Compiling the debugger interface</title>
<para>The following steps are required to enable the debugger interface: </para>
<orderedlist>
<listitem>
<para>Enable the debugger in <literal>$EXIST_HOME/extensions/local.build.properties</literal> by adding <code>include.feature.debugger =
true</code>. Create the document if does not exist.</para>
</listitem>
<listitem>
<para>Download the required jar files. [TBD WHAT JAR FILES?]</para>
</listitem>
<listitem>
<para>Recompile eXist-db with <code>build.sh</code> or <code>build.bat</code>.</para>
</listitem>
</orderedlist>
</sect1>
<!-- ================================================================== -->
<sect1>
<title>Setup your editor</title>
<para>Currently two editors can use the debugger interface: Emacs and VIM. </para>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<sect2>
<title>Emacs</title>
<para>First you need to install <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://code.google.com/p/geben-on-emacs/" condition="_blank">geben</link>. When installed you can start geben with <code>Meta-x geben</code></para>
<para>Then run your XQuery script in the debug mode: <literal>http://www.example.com/script.xql?XDEBUG_SESSION_START</literal> [TBD: WHAT IS
MEANT? THIS PARTICULAR URL?] or use the <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://addons.mozilla.org/en-US/firefox/addon/3960" condition="_blank">Xdebug Helper</link> add-on for Firefox. </para>
<para>If every thing was done correct you should see <literal>script.xql</literal>. Available commands are: </para>
<variablelist spacing="compact">
<varlistentry>
<term>spc</term>
<listitem>
<para>step into/step over</para>
</listitem>
</varlistentry>
<varlistentry>
<term>i</term>
<listitem>
<para>step into</para>
</listitem>
</varlistentry>
<varlistentry>
<term>o</term>
<listitem>
<para>step over</para>
</listitem>
</varlistentry>
<varlistentry>
<term>r</term>
<listitem>
<para>step out</para>
</listitem>
</varlistentry>
<varlistentry>
<term>b</term>
<listitem>
<para>set a breakpoint at a line</para>
</listitem>
</varlistentry>
<varlistentry>
<term>u</term>
<listitem>
<para>unset a breakpoint at a line</para>
</listitem>
</varlistentry>
<varlistentry>
<term>g</term>
<listitem>
<para>run</para>
</listitem>
</varlistentry>
<varlistentry>
<term>q</term>
<listitem>
<para>stop</para>
</listitem>
</varlistentry>
</variablelist>
</sect2>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<sect2>
<title>VIM</title>
<para> To debug with vim you have to install the <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.vim.org/scripts/script.php?script_id=1152" condition="_blank">remote debugger interface</link> for the <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://xdebug.org/docs-dbgp.php" condition="_blank">DBGp</link> protocol. In the
editor simply press <guimenuitem>F5</guimenuitem> and browse the XQuery file in debug mode within 5 seconds.</para>
</sect2>
</sect1>
</article>