XqueryDebugger
Wednesday, 30 January 2013 · 12 messages · last reply 16 May 2013
RS
Rob Stapper30 Jan 2013 10:54 #
Hi,
Making intensive use of mappings {} and high-order recursive functions, I really could do with a nice debugger for the Xquery in BaseX.
Is a debugger in the planning?
Thnx.
Regards,
Rob Stapper
ML
Marco Lettere30 Jan 2013 17:45 #
Big up for the question!
We also would appreciate a debugger a lot and more or less for the same reason.
We've tried to set BaseX as execution engine for the debugger for Eclipse made by Zorba. But it doesn't work.
There seems to be some kind of linkage problem since we never actually 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
M.
Quoted text · Rob Stapper · 21 lines
On 01/30/2013 10:54 AM, Rob Stapper wrote: > > Hi, > > Making intensive use of mappings {} and high-order recursive > functions, I really could do with a nice debugger for the Xquery in BaseX. > > Is a debugger in the planning? > > Thnx. > > Regards, > > Rob Stapper > > > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
CG
Hi Rob,
I was hoping to read "I really could do a nice debugger" ;) …but, yes, it would surely be possible and absolutely desirable. Can’t promise, though, when it will happen, who will do it, and if it will be included in Eclipse, oXygen, or our own GUI. Are there any volunteers out there?
Christian
Quoted text · Rob Stapper · 18 lines
On Wed, Jan 30, 2013 at 10:54 AM, Rob Stapper <r.stapper at lijbrandt.nl> wrote: > Hi, > > Making intensive use of mappings {} and high-order recursive functions, I > really could do with a nice debugger for the Xquery in BaseX. > > Is a debugger in the planning? > > Thnx. > > Regards, > Rob Stapper > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >
CG
Hi Marco,
Quoted text · Marco Lettere · 4 lines
> There seems to be some kind of linkage problem since we never actually > 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
What’s the complete error message? Do you have some more information 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.
ML
Is there any technological hint on where to start?
M.
Quoted text · Christian Grün · 35 lines
On 02/01/2013 05:27 PM, Christian Grün wrote: > Hi Rob, > > I was hoping to read "I really could do a nice debugger" ;) …but, > yes, it would surely be possible and absolutely desirable. Can’t > promise, though, when it will happen, who will do it, and if it will > be included in Eclipse, oXygen, or our own GUI. Are there any > volunteers out there? > > Christian > ___________________________ > > On Wed, Jan 30, 2013 at 10:54 AM, Rob Stapper <r.stapper at lijbrandt.nl> wrote: >> Hi, >> >> Making intensive use of mappings {} and high-order recursive functions, I >> really could do with a nice debugger for the Xquery in BaseX. >> >> Is a debugger in the planning? >> >> Thnx. >> >> Regards, >> Rob Stapper >> >> _______________________________________________ >> BaseX-Talk mailing list >> BaseX-Talk at mailman.uni-konstanz.de >> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >> > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >
CG
Christian Grün1 Feb 2013 17:49 #
Hi Marco,
thanks a lot for asking! Regarding XQDT or oXygen, a first step could be to find out more about the used/provided Debug APIs. I didn’t try the existing debuggers yet, so it could also be interesting to know more about what’s currently possible with Zorba and Saxon. Maybe there are some people out there that can share their experiences?
Christian
Quoted text · Marco Lettere · 48 lines
On Fri, Feb 1, 2013 at 5:42 PM, Marco Lettere <marco.lettere at dedalus.eu> wrote: > Is there any technological hint on where to start? > M. > > > On 02/01/2013 05:27 PM, Christian Grün wrote: >> >> Hi Rob, >> >> I was hoping to read "I really could do a nice debugger" ;) …but, >> yes, it would surely be possible and absolutely desirable. Can’t >> promise, though, when it will happen, who will do it, and if it will >> be included in Eclipse, oXygen, or our own GUI. Are there any >> volunteers out there? >> >> Christian >> ___________________________ >> >> On Wed, Jan 30, 2013 at 10:54 AM, Rob Stapper <r.stapper at lijbrandt.nl> >> wrote: >>> >>> Hi, >>> >>> Making intensive use of mappings {} and high-order recursive functions, I >>> really could do with a nice debugger for the Xquery in BaseX. >>> >>> Is a debugger in the planning? >>> >>> Thnx. >>> >>> Regards, >>> Rob Stapper >>> >>> _______________________________________________ >>> BaseX-Talk mailing list >>> BaseX-Talk at mailman.uni-konstanz.de >>> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >>> >> _______________________________________________ >> BaseX-Talk mailing list >> BaseX-Talk at mailman.uni-konstanz.de >> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >> > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
ML
Hi Chris,
when I set BaseX to be the engine as described in the tutorial on the wiki. Then I create an xquery project and an xquery module.
I try to run the module through an xquery run configuration and the only thing I can see is the following message in the console view:
Error: Could not find or load main class
There is no error or exception in the .metadata/.log of the Eclipse workspace.
I use Indigo, BaseX 7.5, Zorba's xqdt build 1.0.0.201108251748. Everything on Ubuntu 12.10.
May there be any classpath related issues? Does the directories' location matter? Dunno.
Thanks,
M.
Quoted text · Christian Grün · 12 lines
On 02/01/2013 05:31 PM, Christian Grün wrote: > Hi Marco, > >> There seems to be some kind of linkage problem since we never actually >> 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 > What’s the complete error message? Do you have some more information > 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. >
CG
Christian Grün1 Feb 2013 18:01 #
Hm, sounds alright so far. Maybe it’s about the location of your directory. Could you send me a little screenshot of your BaseX XQDT configuration ("Edit Interpreter" dialog)? I’ll then try if I can reproduce it with Ubuntu.
Quoted text · Marco Lettere · 39 lines
On Fri, Feb 1, 2013 at 5:54 PM, Marco Lettere <marco.lettere at dedalus.eu> wrote: > Hi Chris, > when I set BaseX to be the engine as described in the tutorial on the wiki. > Then I create an xquery project and an xquery module. > I try to run the module through an xquery run configuration and the only > thing I can see is the following message in the console view: > > > Error: Could not find or load main class > > There is no error or exception in the .metadata/.log of the Eclipse > workspace. > > I use Indigo, BaseX 7.5, Zorba's xqdt build 1.0.0.201108251748. Everything > on Ubuntu 12.10. > > May there be any classpath related issues? Does the directories' location > matter? Dunno. > > Thanks, > M. > > > On 02/01/2013 05:31 PM, Christian Grün wrote: >> >> Hi Marco, >> >>> There seems to be some kind of linkage problem since we never actually >>> 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 >> >> What’s the complete error message? Do you have some more information >> 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. >> >
JG
Quoted text · Christian Grün · 14 lines
Christian Grün <christian.gruen <at> gmail.com> writes: > > Hi Marco, > > > There seems to be some kind of linkage problem since we never actually > > 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 > > What’s the complete error message? Do you have some more information > 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. >
Hi Marco and Christian,
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.
ML
Marco Lettere16 May 2013 08:43 #
Oh, fine will give it a try immediately.
M.
Quoted text · JörnGruël · 33 lines
On 05/15/2013 03:44 PM, JörnGruël wrote: > Christian Grün <christian.gruen <at> gmail.com> writes: > >> Hi Marco, >> >>> There seems to be some kind of linkage problem since we never actually >>> 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 >> What’s the complete error message? Do you have some more information >> 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. >> > Hi Marco and Christian, > > 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 at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
ML
Marco Lettere16 May 2013 12:45 #
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.
Quoted text · Marco Lettere · 46 lines
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, >>> >>>> There seems to be some kind of linkage problem since we never actually >>>> 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 >>> What’s the complete error message? Do you have some more information >>> 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. >>> >> Hi Marco and Christian, >> >> 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 at mailman.uni-konstanz.de >> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
AB
Andy Bunce16 May 2013 13:43 #
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
On Thu, May 16, 2013 at 11:45 AM, Marco Lettere <marco.lettere at dedalus.eu>wrote:
Quoted text · Marco Lettere · 68 lines
> 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, >>>> >>>> There seems to be some kind of linkage problem since we never actually >>>>> 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<http://docs.basex.org/wiki/Integrating_Eclipse> >>>>> >>>> What’s the complete error message? Do you have some more information >>>> 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. >>>> >>>> Hi Marco and Christian, >>> >>> I had the message "Could not find or load main class", following the >>> instructions from http://docs.basex.org/wiki/**Integrating_Eclipse<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 at mailman.uni-**konstanz.de<BaseX-Talk at mailman.uni-konstanz.de> >>> https://mailman.uni-konstanz.**de/mailman/listinfo/basex-talk<https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk> >>> >> >> ______________________________**_________________ >> BaseX-Talk mailing list >> BaseX-Talk at mailman.uni-**konstanz.de <BaseX-Talk at mailman.uni-konstanz.de> >> https://mailman.uni-konstanz.**de/mailman/listinfo/basex-talk<https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk> >> > > ______________________________**_________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-**konstanz.de <BaseX-Talk at mailman.uni-konstanz.de> > https://mailman.uni-konstanz.**de/mailman/listinfo/basex-talk<https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk> >
Written for BaseX 7.5, 7.6. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery