Powerful API endpoints for PHP debugging, code analysis, and security scanning. Real-time results, programmatic access, and open-source transparency.
POST /api/debug
Analyze code for performance issues, security flaws, and code quality.
Returns structured JSON format with actionable code suggestions.
GET /api/trace/{session_id}
Retrieve millisecond-precise execution timelines of debug sessions.
Includes variable states, API call logs, and database query timelines.
POST /api/scan
Scan web applications for vulnerabilities like SQL injection and XSS.
Returns detailed security report including risk severity classifications.
GET /api/metrics/{project_id}
Get cyclomatic complexity, maintainability index, and other code quality metrics.
Returns historical metric tracking and project-wide statistics.
Content-Type: application/json
Authorization: Bearer YOUR_TOKEN
{ "analysis": "security", "results": { "xss_detection": 2, "sql_injection": 1 }, "code_quality": { "cyclomatic_complexity": 6.4, "maintainability": 84 } }
DebugPHP uses token-based authentication for API access. Tokens can be generated in your account settings.
curl -X POST "https://debug.php/api/debug" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "code": "" }
Connect with popular development tools
Get code analysis and debugging suggestions directly in your editor.
View Documentation →Integrate with CI/CD pipelines for automated debugging and analysis.
View Documentation →