{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":48745,"path":"servicenow-platform/remote-tables/debugging-remote-table-scripts.md","title":"Debugging remote table script definitions","bundle":null,"doc_type":null,"release":"australia","body":"\n# Debugging remote table script definitions\n\nYou can enable session debugging for remote table script definitions. To enable script definition logging in a session debug log, set the **glide.script.vtable.log.debug** property to **true**.\n\nWhen you create remote table script definitions, you can use the `gs.debug()` command to add debug logs that are visible in the session debugger. The session debugger also contains debug logs with \\[RemoteTable\\] tags, each with the following information:\n\n-   Query definition\n-   Number of rows loaded in the remote table\n-   Number of aggregate rows `(if GlideAggregate)`\n\nProlonged use of the **glide.script.vtable.log.debug** property can affect performance, so it is best to set its value to **false** when you finish a debugging session.\n\n**Note:** If you are not on the application node that processed your remote table script, you may not see the resulting log statements. In this case, contact Technical Support.\n\nUse the v\\_query.setLastErrorMessage\\(message\\) API to set the last error message that appears at the bottom of the list view. In script, you can retrieve this message using the glideRecord.getLastErrorMessage\\(\\) API. To learn more about these APIs, see [Text-To-Display](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/api-reference/server-api-reference/c_GlideRecordScopedAPI.md).\n\n**Parent Topic:**[Remote tables](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/remote-tables/remote-tables.md)\n\n**Related topics**  \n\n\n[Available system properties](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-administration/r_AvailableSystemProperties.md)\n\n[Script Debugger and Session Logging](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/api-reference/scripts/script-debugger.md)\n\n"}}