Technical Specs

API Reference

Comprehensive documentation for the DebugX tracking APIs and SDK methods. Build custom integrations and manual logging workflows.

Global Methods

init()

Initialization

Initializes the DebugX client with your project credentials. This should be called once as early as possible.

DebugX.init({
  apiKey: 'YOUR_API_KEY',
  sampleRate: 1.0 // 0.0 to 1.0
});
captureException()

Manual Error Logging

Sends a custom error object to DebugX. Useful for `try-catch` blocks where an error is handled but still needs to be logged.

try {
  // ... logic
} catch (err) {
  DebugX.captureException(err);
}

Ingest API (REST)

For environments where our SDK is not supported, you can send errors directly to our ingestion endpoint.

POST
https://debugx.ai/api/ingest/server
Request Payload
{ "errorMessage": "Custom Error Message", "errorStack": "Error: Custom Error Message\n at ...", "context": { "userId": "user_123", "version": "1.0.1", "projectId": "project_abc123" } }

User Context

Identify users and add custom tags to your logs to make filtering easier.

DebugX.setUser(userId, userData);

Attaches a unique ID and custom data to all subsequent errors.

DebugX.setTag(key, value);

Adds a searchable tag to current session.