# Set some breakpoints in a script

Define breakpoints in the script of an app by using the [SetScriptBreakpoints method](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/EngineJSONAPI/Content/service-doc-setscriptbreakpoints.htm).

## Example

[](https://help.qlik.com/en-US/sense-developer/Subsystems/EngineAPI/Content/Sense_EngineAPI/CreatingAppLoadingData/EditDataLoadScript/set-breakpoints-in-script.htm)

#### The goal of this example, is to set two breakpoints in a script, one at line 2 ("qlineIx" is 2) and one at line 6. The breakpoint at line 2 is in use ("qEnabled" is true).

The handle of the request is 1 because the [SetScriptBreakpoints method](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/EngineJSONAPI/Content/service-doc-setscriptbreakpoints.htm) applies at app level.

The client sends:

```
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "SetScriptBreakpoints",
  "handle": 1,
  "params": [
    [
      {
        "qbufferName": "BreakPoint1",
        "qlineIx": 2,
        "qEnabled": true
      },
      {
        "qbufferName": "BreakPoint2",
        "qlineIx": 6,
        "qEnabled": false
      }
    ]
  ]
}
```

The engine returns:

```
{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {}
}
```

The breakpoints are defined.