I believe the XQDT debugger only works for Zorba [1]. It would be great to see a debugger for BaseX but it would be a lot of work. [2] might provide some useful tips.
Perhaps a first step would be to define event interfaces for points in the XQuery execution that a debugger might want to hook into. This could also be used for profiling.
As a very poor mans debugger: adding the System.out calls below to
src\main\java\org\basex\query\func\StaticFunc.java will show the start and end of function calls.
/Andy
public Value invValue(final QueryContext ctx, final InputInfo ii, final Value... arg)
throws QueryException {
// reset context and evaluate function
final Value cv = ctx.value;
final StaticContext cs = ctx.sc;
ctx.sc = sc;
ctx.value = null;
final int fp = addArgs(ctx, ii, arg);
System.out.print(">");
System.out.println(this.name);
try {
final Value v = ctx.value(expr);
// optionally promote return value to target type
return cast ? declType.funcConvert(ctx, info, v) : v;
} finally {
scope.exit(ctx, fp);
ctx.value = cv;
ctx.sc = cs;
System.out.print("<");
System.out.println(this.name);
}
}
[1] http://stackoverflow.com/questions/3720866/debugger-for-xquery-that-uses-saxon
[2] http://e-collection.library.ethz.ch/eserv/eth:30358/eth-30358-01.pdf
After doing the Xmx trick suggested by Joern, I'm finally able to run XQueries on BaseX from inside Eclipse.
But yet when I try to run the debugger I get the following error in a popup:
Title: Interpreter runner not found
Interpreter runner not specified for install 'basex' and mode 'debug'.
Any other hint?
M.
On 05/16/2013 08:43 AM, Marco Lettere wrote:
Oh, fine will give it a try immediately.
M.
On 05/15/2013 03:44 PM, JörnGruël wrote:
Christian Grün <christian.gruen <at> gmail.com> writes:
Hi Marco,Hi Marco and Christian,
There seems to be some kind of linkage problem since we never actuallyWhat’s the complete error message? Do you have some more information
succeded in linking eclipse with basex ("Error: Could not find or load main
class") even when following the tut at:
http://docs.basex.org/wiki/Integrating_Eclipse
on the Eclipse and BaseX version you have tried? It should work fine
with any recent version of BaseX, Eclipse Indigo and the XQDT update
link, and most other configurations we have tried so far.
I had the message "Could not find or load main class", following the
instructions from http://docs.basex.org/wiki/Integrating_Eclipse for setting
up as client, after yet adding "-Xmx512m" at "Java arguments:" it worked for
me. (Got this idea just from looking into the bin/basex sart script within
the basex installdir, not yet spend more thoughts on the background...)
Regards,
Joern.
_______________________________________________
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
_______________________________________________
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
_______________________________________________
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk