Live Debugger
For instructions on how to authenticate to use this endpoint, see API overview.
Create, Read, Update and Delete breakpoints for live debugging.
Endpoints
GET | |
POST | |
GET | |
PATCH | |
DELETE | |
GET | |
GET |
List all live debugger breakpoints
Required API key scopes
live_debugger:readPath parameters
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Query parameters
- filenamestring
- limitinteger
Number of results to return per page.
- offsetinteger
The initial index from which to return the results.
- repositorystring
Response
Example request
GET /api /projects /:project_id /live_debugger_breakpointsExample response
Status 200
Create live debugger breakpoints
Required API key scopes
live_debugger:writePath parameters
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Request parameters
- repositorystring
- filenamestring
- line_numberinteger
- enabledboolean
- conditionstring
Response
Example request
POST /api /projects /:project_id /live_debugger_breakpointsExample response
Status 201
Retrieve live debugger breakpoints
Required API key scopes
live_debugger:readPath parameters
- idstring
A UUID string identifying this live debugger breakpoint.
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Response
Example request
GET /api /projects /:project_id /live_debugger_breakpoints /:idExample response
Status 200
Update live debugger breakpoints
Required API key scopes
live_debugger:writePath parameters
- idstring
A UUID string identifying this live debugger breakpoint.
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Request parameters
- repositorystring
- filenamestring
- line_numberinteger
- enabledboolean
- conditionstring
Response
Example request
PATCH /api /projects /:project_id /live_debugger_breakpoints /:idExample response
Status 200
Delete live debugger breakpoints
Required API key scopes
live_debugger:writePath parameters
- idstring
A UUID string identifying this live debugger breakpoint.
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Example request
DELETE /api /projects /:project_id /live_debugger_breakpoints /:idExample response
Status 204 No response body
Retrieve live debugger breakpoints active
External API endpoint for client applications to fetch active breakpoints using Project API key. This endpoint allows external client applications (like Python scripts, Node.js apps, etc.) to fetch the list of active breakpoints so they can instrument their code accordingly.
Authentication: Requires a Project API Key in the Authorization header: Authorization: Bearer phs_<your-project-api-key>. You can find your Project API Key in PostHog at: Settings → Project → Project API Key
Required API key scopes
live_debugger:readPath parameters
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Query parameters
- enabledboolean
Only return enabled breakpoints
- filenamestring
Filter breakpoints for a specific file
- repositorystring
Filter breakpoints for a specific repository (e.g., 'PostHog/posthog')
Response
Example request
GET /api /projects /:project_id /live_debugger_breakpoints /activeExample response
Status 200 List of breakpoints for client consumption
Status 400 Invalid query parameters
Status 401 Invalid or missing Project API key
Retrieve live debugger breakpoints breakpoint hits
Retrieve breakpoint hit events from ClickHouse with optional filtering and pagination. Returns hit events containing stack traces, local variables, and execution context from your application's runtime.
Security: Breakpoint IDs are filtered to only include those belonging to the current team.
Required API key scopes
live_debugger:readPath parameters
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Query parameters
- breakpoint_idsstring
Filter hits for specific breakpoints (repeat parameter for multiple IDs, e.g., ?breakpoint_ids=uuid1&breakpoint_ids=uuid2)
- limitinteger
Number of hits to return (default: 100, max: 1000)
- offsetinteger
Pagination offset for retrieving additional results (default: 0)
Response
Example request
GET /api /projects /:project_id /live_debugger_breakpoints /breakpoint_hits