Debugging Queries Which Import Modules

When debugging queries on a MarkLogic database which import modules stored in the database the recommended steps for placing a breakpoint in a module are the following:
  1. Start the debugging session with the action Debug Scenario from the Transformation toolbar or the XQuery Debugger toolbar button.
  2. 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 which you will debug are already opened in the editor. This is necessary so that the breakpoints in modules will be considered. Also make sure there are no other opened modules which are not involved in the current debugging session.