list_debug_profiles
Retrieve saved debug configurations for PHP applications using Xdebug's DBGp protocol to manage breakpoints, variable inspection, and stack traces.
Instructions
List all saved debug profiles
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {},
"type": "object"
}
Implementation Reference
- src/tools/advanced.ts:615-647 (registration)Registration of the 'list_debug_profiles' tool, including its inline handler function that lists all saved debug profiles with details like name, description, breakpoint count, etc., and indicates the active profile.server.tool( 'list_debug_profiles', 'List all saved debug profiles', {}, async () => { await ctx.configManager.loadProfiles(); const profiles = ctx.configManager.getAllProfiles(); const activeProfile = ctx.configManager.getActiveProfile(); return { content: [ { type: 'text', text: JSON.stringify( { activeProfile: activeProfile?.name || null, profiles: profiles.map((p) => ({ name: p.name, description: p.description, breakpoints: p.breakpoints.length, watches: p.watchExpressions.length, createdAt: p.createdAt, updatedAt: p.updatedAt, })), }, null, 2 ), }, ], }; } );
- src/tools/advanced.ts:619-646 (handler)The handler function for 'list_debug_profiles' tool. Loads profiles, retrieves all and active profile, and returns a JSON-formatted text content listing them.async () => { await ctx.configManager.loadProfiles(); const profiles = ctx.configManager.getAllProfiles(); const activeProfile = ctx.configManager.getActiveProfile(); return { content: [ { type: 'text', text: JSON.stringify( { activeProfile: activeProfile?.name || null, profiles: profiles.map((p) => ({ name: p.name, description: p.description, breakpoints: p.breakpoints.length, watches: p.watchExpressions.length, createdAt: p.createdAt, updatedAt: p.updatedAt, })), }, null, 2 ), }, ], }; }