XQuery Debugger

XQuery debugger

XQuery Debugging Features:

  • Support for XQuery 1.0 and XQuery 3.1
  • XQUery back-mapping
  • Step-by-step node & instruction execution
  • Setting breakpoints to halt the debugger
  • Variables information window
  • Call stack information window
  • XML, XQuery, and output panes in parallel
  • Full-screen XQuery Debugger: for testing complex documents
  • XQuery Debugger Window: for development of expressions or functions
  • XQuery profiler for further optimization

Download Trial

XQuery Debugger

XMLSpy includes an XQuery debugger for testing and perfecting your XQuery code. You can work with the full-screen XQuery Debugger (shown above) when analyzing results of large, complex XQuery documents against XML databases on a server, for instance, but might prefer the XQuery Debugger Window (below) during developement of shorter XQuery expressions and functions.

The easy-to-use XQuery debugger includes a multi-panel interface that displays the XQuery document, the source XML document (optional), and the current XQuery processor context. Below these three panels, Variable and Callstack information windows include multiple tabs that supply all the necessary debugging information.

The XQuery debugger allows you to set breakpoints on any node in the XML file and any expression in the XQuery document to halt the debugger whenever a particular node or instruction is accessed. This speeds up debugging sessions since you do not have to step through each statement in the XQuery document manually. You can also view and manage a list of currently defined breakpoints with the handy XQuery Breakpoints dialog.

When you click the Start Debugger/Go icon, the XQuery processor stops at the first breakpoint and displays the partial output relative to the context of the XQuery processor at that point in the document. The debugger highlights the current node in the XML file and the current instruction in the XQuery document, and all variables, xpath-watch values, and call stack data relevant to that point are displayed in the debugger info windows.

The ability to see the specific XML data node, the XQuery instruction, and the partial output at the same time provides you with an immediate visual understanding of the way that your XQuery document is processing the XML data. While the debugger is open you can make changes to your XML and/or XQuery documents at any time using the intelligent editing features of XMLSpy.

XQuery Debugger Window

The XPath/XQuery Debugger Window is part of the powerful XPath/XQuery tab at the bottom of the XMLSpy interface. It's perfect for debugging shorter snippets of XQuery code for instant, interactive feedback. Because the Debugger is in the same window as the powerful XQuery editor, you can debug your code as you're building it with point-and-click expression building, enhanced entry helpers, ready-to-use code snippets, and other time-saving tools.

As you're working, you can toggle between vertical or horizontal layout of the window to accomodate the length of the XQuery code at hand.

XQuery debugger window

XQuery Back-mapping

XMLSpy includes unique back-mapping functionality that allows you to instantly see the source XML node and XQuery expression - simply by clicking a node in the XQuery output.

When you click the Enable Back-mapping button on the toolbar, XQuery executions will be carried out so that the result document can be mapped back on to the source XQuery+XML documents. When you click on a node in the result document, the XQuery instruction and the XML source data that generated that particular result node will be highlighted, for immediate debugging.

XQuery back-mapping saves developers significant amount of time understanding and perfecting code. And what's more, XMLSpy doesn't modify the output code at all to achieve XQuery back-mapping.

Video Watch the XQuery / XSLT back-mapping video.

XQuery back-mapping

More XQuery Tools:

Next Steps