XQuery database debugging

XQuery debugging is currently supported only for the MarkLogic database engine.

To start a debug session against the MarkLogic engine you will first need to configure a MarkLogic datasource and a MarkLogic connection. Also you have to make sure that the debugging support is enabled in the MarkLogic server that will be accessed from <oXygen/>.

The MarkLogic XQuery debugger integrates seamlessly into the XQuery Debugger perspective. If you already have a MarkLogic scenario configured for the XQuery file you can choose directly to debug the scenario. If not, you just have to switch to the XQuery Debugger perspective, open the XQuery file in the editor and select the MarkLogic connection in the  XQuery engine selector from the debug control toolbar. For general information about how a debugging session is started and controlled see the working with the debugger section.

When debugging queries which import modules the recommended steps are as follows:

[Important]Peculiarities and limitations of the MarkLogic debugger integration:
  • Debugging support is available only for MarkLogic server versions 3.2 or newer.

  • For MarkLogic server versions 4.0 or newer there are three XQuery syntaxes which are supported: '0.9-ml' (inherited from MarkLogic 3.2), '1.0-ml' and '1.0'

  • All the debugging steps are executed by the MarkLogic server and the results or possible errors of each step are presented by the local debugger user interface.

  • All declared variables are presented as strings.

  • No support for Output to Source Mapping.

  • No support for evaluating break conditions.

  • No support for showing the trace.

  • Breakpoints can be set in the imported modules but they are only active if the modules are opened in the editor at the time of debugging.

  • Break conditions are not supported hence the Break Conditions view is disabled in the XQuery Debugger perspective.

  • The modules can only be opened in the editor during the debugging session by stepping in repeatedly until reaching the module.

  • There should not be any breakpoints set in modules from the same server which are not involved in the current debugging session.