Developer tool
Xdebug Config Generator
Generate Xdebug 3 (modern) or historical Xdebug 2 ini snippets for step debugging setups.
How it works
What it does
The Xdebug Config Generator produces ini snippets for step debugging. Modern output targets Xdebug 3 mode/client settings; Xdebug 2 output is available as a clearly labeled historical reference for legacy environments that have not upgraded yet.
When to use it
- First-time IDE debugging setup (PhpStorm, VS Code, etc.)
- Aligning container Xdebug with host IDE listen ports
- Replacing outdated
xdebug.remote_*examples with Xdebug 3mode/client_hoststyle
How input is processed safely
Form fields become ini text. No debugger session is opened from this site to your machine, no reverse shell is created, and no PHP code you paste is executed. You apply the snippet in your own environment.
Examples
- Xdebug 3:
xdebug.mode=debugwith client host for Docker bridge networking - Start-with-request vs trigger-based debugging notes
- Historical Xdebug 2 remote enable settings for archaeology only
Common mistakes
- Leaving Xdebug enabled on production traffic paths
- Mixing v2 and v3 directives in one file
- Wrong client_host so the container cannot reach the IDE listener
Step debugging is a workflow: IDE listens, PHP/Xdebug connects outward (typical Xdebug 3), and path mappings translate container paths to local paths. Generated ini files only cover the PHP side—you still configure the IDE listener and mappings.
Prefer trigger-based debugging so ordinary requests stay fast. Always-on debug mode can devastate performance if left enabled. Never enable Xdebug on public production traffic; use a staging replica or a local dataset.
When sharing configs with teammates, document the IDE port and OS-specific hostnames (host.docker.internal vs Docker bridge gateway). Small networking differences cause most “it works on my machine” debugger failures.
Practical tips
- Keep inputs small and representative; huge pastes slow feedback and raise risk of accidental secret disclosure.
- After using Xdebug Config Generator, verify the result in your own environment (correct SAPI, correct host, correct project root).
- Cross-link findings to ZendStudio.net PHP error guides and IDE setup pages when the next step is configuration rather than code edits.
- Prefer repeatable project tooling (CI, Composer scripts, IDE inspections) for repo-wide enforcement; this page is for interactive problem-solving.
Privacy note
Debug connections can expose request data to your IDE. Never point production traffic at a public debugger and do not share ini files that contain proprietary path maps you consider sensitive.
Run in browser
AJAX processing only. No remote PHP execution sandbox. Results are not indexed.
Safety notes
- Submitted tool contents are not written to analytics or search logs.
- This site never evaluates arbitrary PHP from the browser.
- Generated configs are starting points—validate on a staging host before production.