Debugging with MarkLogic

To start a debug session against the MarkLogic engine, configure a MarkLogic data source and a MarkLogic connection. Make sure that the debugging support is enabled in the MarkLogic server that Oxygen XML Developer plugin accesses. On the server side, debugging must be activated in the XDBC server and in the Task Server section of the server control console (the switch debug allow). If the debugging is not activated, the MarkLogic server reports the DBG-TASKDEBUGALLOW error.

The MarkLogic XQuery debugger integrates seamlessly into the XQuery Debugger perspective. If you have a MarkLogic scenario configured for the XQuery file, you can choose to debug the scenario directly. If not, 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.

If you want to debug an XQuery file stored on the MarkLogic server, we recommend you to use the Data Source Explorer view to open the module and start the debugging session. This improves the resolving of any imported modules.

Before starting a debugging session, we recommend that you link the MarkLogic connection with an Eclipse project. To do this, go to the Data Source Explorer view and select Link to project in the contextual menu of the MarkLogic connection. The major benefit of linking a debugging session with a project is that you can add breakpoints in the XQuery modules stored on the server. You are also able to access these modules from the Eclipse navigator and run debugging sessions from them.

Oxygen XML Developer plugin supports collaborative debugging. This feature allows multiple users to participate in the same debugging session. You can start a debugging session and at a certain point another user can continue it.

In a MarkLogic debugging session, when you add a breakpoint on a line where the debugger never stops, Oxygen XML Developer plugin displays a warning message. These warnings are displayed for breakpoints you add either in the main XQuery (which you can open locally or from the server), or for breakpoints you add in any XQuery that is opened from the connection that participates in the debugging session.

Remote Debugging with MarkLogic

The HTTP and the XDBC servers involved in the debugging session must have the same modules configuration.

To watch our video demonstration about the XQuery debugger for MarkLogic, go to http://oxygenxml.com/demo/XQueryDebuggerforMarkLogic.html.

Parent topic: XQuery Database Debugging Previous topic: XQuery Database Debugging Next topic: Peculiarities and Limitations of the MarkLogic Debugger