{"id":21228,"date":"2022-04-11T13:56:06","date_gmt":"2022-04-11T11:56:06","guid":{"rendered":"https:\/\/help.openbee.com\/open-bee-scan-capture\/knowledge-base\/how-to-guides\/scripts-in-capture\/built-in-debugger\/"},"modified":"2026-05-13T09:36:45","modified_gmt":"2026-05-13T07:36:45","slug":"built-in-debugger","status":"publish","type":"page","link":"https:\/\/help.openbee.com\/en\/open-bee-scan-capture\/knowledge-base\/how-to-guides\/scripts-in-capture\/built-in-debugger\/","title":{"rendered":"Built-in debugger"},"content":{"rendered":"\n<p>Within Open Bee\u2122 Scan Capture, you have the ability to validate your script&#8217;s code by running it using the built-in debugger<\/p>\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/help.openbee.com\/wp-content\/uploads\/2022\/04\/273356271.png\" alt=\"\"\/><\/figure>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>Warning: this debugger will only work to test pure Javascript code, if your script contains pre-built Capture variables or references to an index value e.g.:<\/p><\/blockquote>\n\n<pre class=\"wp-block-code\"><code>return DOCUMENT_STATE<\/code><\/pre>\n\n<p>or<\/p>\n\n<pre class=\"wp-block-code\"><code>return getTextFromIndexInfo(getFirstIndexFromID(pParameters,&nbsp;\"ID_INDEX\"))<\/code><\/pre>\n\n<p>Indeed, these values require the script to be linked to a document when it is executed, but during your test no document is attached to it, so these values will be skewed and the proposed result will not be correct<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Within Open Bee\u2122 Scan Capture, you have the ability to validate your script&#8217;s code by running it using the built-in debugger Warning: this debugger will only work to test pure Javascript code, if your script contains pre-built Capture variables or references to an index value e.g.: or Indeed, these values require the script to be [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":21211,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"templates\/ob-help-products.php","meta":{"footnotes":""},"class_list":["post-21228","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/pages\/21228","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/comments?post=21228"}],"version-history":[{"count":1,"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/pages\/21228\/revisions"}],"predecessor-version":[{"id":21229,"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/pages\/21228\/revisions\/21229"}],"up":[{"embeddable":true,"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/pages\/21211"}],"wp:attachment":[{"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/media?parent=21228"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}