dbg:stop() as empty-sequence()
Placing this call in XQuery will instruct the evaluator to stop a request for debugging.
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).
dbg:stop() => ()
(: 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". :)
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.