Loading TOC...

dbg:invoke

dbg:invoke(
   $uri as xs:string,
   [$vars as item()*],
   [$options as (element()|map:map)?]
) as xs:unsignedLong

Summary

Invoke a module for debugging. Module evaluation will be stopped at the start of the first expression. Returns the request ID after creating the request.

Parameters
uri The path of the module to be executed. The path is resolved against the root of the request server evaluating the query. The path must resolve to a main module (not a library module).
vars The external variable values for this evaluation. This must be a sequence of even length, alternating QNames and items. Each QName and item pair specify a variable name and value.
options The options node. The default value is (). The node for the dbg:eval options must be in the xdmp:eval namespace. See the xdmp:eval section for a list of options.

Required Privileges

http://marklogic.com/xdmp/privileges/debug-my-requests or http://marklogic.com/xdmp/privileges/debug-any-requests

Usage Notes

The "update" option is not supported.

Example

  dbg:invoke("http://example.com/modules/foo.xqy")
  => 6423840
  

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.