--- title: Script Debugger API description: The Script Debugger API provides endpoints to debug lines of server-side JavaScript code, such as business rules and script includes.Retrieve a list of breakpoints or logpoints in a server-side script, such as a business rule or script include.Add, update, or remove breakpoints or logpoints in a server-side script, such as a business rule or script include. Process several breakpoints or logpoints at a time. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/api-reference/rest-apis/scriptdebugger-api.html release: australia product: REST APIs classification: rest-apis topic_type: concept last_updated: "2026-03-12" reading_time_minutes: 8 breadcrumb: [REST API reference, API reference, API implementation and reference] --- # Script Debugger API The Script Debugger API provides endpoints to debug lines of server-side JavaScript code, such as business rules and script includes. For more information about the Script Debugger, see [Script Debugger and Session Log](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/scripts/script-debugger.md). This API is available by default. **Parent Topic:**[REST API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/api-rest.md) ## Script Debugger - GET /js/debugpoints/script/\{tableName\}/\{sysId\}/\{fieldName\} Retrieve a list of breakpoints or logpoints in a server-side script, such as a business rule or script include. ### URL format Default URL: `/api/now/js/debugpoints/script/{tableName}/{sysId}/{fieldName}` ### Supported request parameters
| Name | Description |
|---|---|
| tableName | Name of the table that contains the server-side script, such as sys\_script or sys\_script\_include.Data type: String |
| sysId | Sys\_id for the server-side script.Data type: String |
| fieldName | Name of the field that contains the server-side script content.Data type: String |
| Header | Description |
|---|---|
| Accept | Data format of the response body. Supported types: **application/json** or **application/xml**. Default: **application/json** |
| Name | Description |
|---|---|
| canWrite | Flag indicating whether the currently logged in user can set or modify breakpoints for the script.Possible values: - true: You can set or modify breakpoints. - false: You cannot set or modify breakpoints. Data type: Boolean |
| debugpoints | List of all the breakpoints and logpoints in the script.``` "debugpoints": { "breakpoint": {Object} "logpoint": {Object} } ``` Data type: Object |
| debugpoints.breakpoint |
List of all the breakpoints in the script, presented as key-value pairs. The key is the line number for the breakpoint. The value is an object containing the breakpoint's sys\_id and text.```
"breakpoint": {
|
| debugpoints.breakpoint.<line\_number> |
Line number for the breakpoint.```
|
| debugpoints.breakpoint.<line\_number>.evaluationString | Text of the breakpoint. If the breakpoint is conditional, the evaluationString contains the condition text. If the breakpoint is not conditional, the evaluationString is an empty string. Data type: String |
| debugpoints.breakpoint.<line\_number>.sysId | Sys\_id of the breakpoint.Data type: String |
| debugpoints.logpoint |
List of all the logpoints in the script, presented as key-value pairs. The key is the line number for the logpoint. The value is an object containing the logpoint's sys\_id and text.```
"logpoint": {
|
| debugpoints.logpoint.<line\_number> |
Line number for the logpoint.```
|
| debugpoints.logpoint.<line\_number>.evaluationString | Text of the logpoint. Contains the message being logged.Data type: String |
| debugpoints.logpoint.<line\_number>.sysId | Sys\_id of the logpoint.Data type: String |
| key | Object providing details about the script being debugged. ``` "key": { "scriptField": "String" "scriptId": "String" "scriptType": "String" "value": "String" } ``` Data type: Object |
| key.scriptField | Name of the field that contains the script.Data type: String |
| key.scriptId | Sys\_id of the script.Data type: String |
| key.scriptType | Name of the table that contains the script.Data type: String |
| key.value | The path parameters used to make the request. Listed in the following order.- tableName - sysId - fieldName Data type: String |
| name | Name of the script.Data type: String |
| script | Text displaying the script's code.Data type: String |
| Name | Description |
|---|---|
| fetchAll | When true, returns a list of all the breakpoints or logpoints added or updated by the user.Data type: Boolean Default: false |
| fetchAllFilter | Returns a filtered list of all the breakpoints or logpoints added or updated by the user. Valid values: - debugpointType. Set to either breakpoint or logpoint. - scriptId. Set to the sys\_id of the script in which to search for debug points. - scope. Set to the name of the scope in which to search for debug points. Use the caret \(^\) symbol as a separator for multiple properties. For example, `fetchAllFilter=debugpointType=logpoint^scope=MyApp` Data type: String |
| Name | Description |
|---|---|
| debugpointType | Required. Type of debug point to add, delete, or update. Valid values: - breakpoint - logpoint Data type: String |
| evaluationString | Text for a logpoint or conditional breakpoint. For a logpoint, the **evaluationString** is the log message. For a conditional breakpoint, the **evaluationString** is the condition. For example, if you're looping through a list of user IDs and you want the debugger to pause only when the user ID is 38493, you can add a conditional breakpoint inside the loop with `userID == 38493` as the condition. The debugger will only pause at this breakpoint when the condition is true. If the breakpoint is not a conditional breakpoint, the **evaluationString** is an empty string. Data type: String |
| fieldName | Required. Name of the field that contains the server-side script content.Data type: String |
| lineNumber | Line number in the server-side script specifying where to add, delete, or update the breakpoint or logpoint.Data type: Number |
| operation | Required. Operation to perform for the breakpoint or logpoint.Valid values: - add - delete - update Data type: String |
| scriptId | Required. Sys\_id for the server-side script.Data type: String |
| tableName | Required. Name of the table that contains the server-side script, such as sys\_script or sys\_script\_include.Data type: String |
| Header | Description |
|---|---|
| Accept | Data format of the response body. Supported types: **application/json** or **application/xml**. Default: **application/json** |
| Content-Type | Data format of the request body. Supported types: **application/json** or **application/xml**. Default: **application/json** |
| Name | Description |
|---|---|
| requestedDebugpoints | List of the requested breakpoints and logpoints. Presented as an array of objects.``` "requestedDebugpoints": [ { "scriptId": "String", "evaluationString": "String", "operation": "String", "tableName": "String", "fieldName": "String", "status": "String", "lineNumber": Number, "debugpointType": "String" } ] ``` Data type: Array |
| requestedDebugpoints.ScriptId | Sys\_id for the server-side script.Data type: String |
| requestedDebugpoints.evaluationString | Text added for a logpoint or conditional breakpoint. For a logpoint, the **evaluationString** is the log message. For a conditional breakpoint, the **evaluationString** is the condition. Data type: String |
| requestedDebugpoints.operation | Operation performed for the breakpoint or logpoint. Possible values: - add - delete - update Data type: String |
| requestedDebugpoints.tableName | Name of the table that contains the server-side script, such as sys\_script or sys\_script\_include.Data type: String |
| requestedDebugpoints.fieldName | Name of the field that contains the server-side script content.Data type: String |
| requestedDebugpoints.status | Result of the instruction to add, delete, or update a specific breakpoint or logpoint. Possible values: - failure - ignored - success A request to add, delete, or update a debug point is ignored in the following situations: - It requests to delete a breakpoint or logpoint that doesn't exist. - It requests to add a breakpoint or logpoint identical to one that already exists. Data type: String |
| requestedDebugpoints.lineNumber | Line number in the server-side script specifying where the breakpoint or logpoint was added, deleted, or updated.Data type: Number |
| requestedDebugpoints.debugpointType | Type of debug point added, deleted, or updated. Possible values: - breakpoint - logpoint Data type: String |
| status | Result of the overall action. The status code for the HTTP call.Data type: Number |