MarkLogic 9 Product Documentation
dbg:stop

dbg:stop() as empty-sequence()

Summary

Placing this call in XQuery will instruct the evaluator to stop a request for debugging.

Usage Notes

Calling dbg:stop stops the request immediately, and therefore if there are any expressions after the call they will not be evaluated until you call another debug function that accesses the stopped query and makes the debuging commence (dbg:continue or dbg:step, for example). Before you commence debugging a stopped query, it will appear to be hung (because it is stopped).

Example

  dbg:stop()
  => ()
  

Example

(: first run this in one request :)
"hello", dbg:stop(), xdmp:log("look in app error log")
(:
   It will stop at the dbg:stop. 
   Next run the following (in another request, from another instance
   of Query Console if you are using Query Console).  
:)
dbg:continue(dbg:stopped()[1])
(:
   Look in app error log for the log message, and look at the original
   query to see it returned "hello".
:)
Powered by MarkLogic Server | Terms of Use | Privacy Policy