Debugging Queries Which Import Modules

When debugging queries on a MarkLogic database that imports modules stored in the database, the recommended steps for placing a breakpoint in a module are as follows:
  1. Start the debugging session with the action Debug Scenario from the Transformation toolbar or the XQuery Debugger toolbar button.
  2. Click Step into repeatedly until reaching the desired module.
  3. Add the module to the current project for easy access.
  4. Set breakpoints in the module as needed.
  5. Continue debugging the query.
When starting a new debugging session, make sure that the modules that you will debug are already opened in the editor. This is necessary so that the breakpoints in the modules will be considered. Also, make sure that there are no other opened modules that are not involved in the current debugging session.