Xdebug in WordPress Studio
Xdebug is a debugging extension for PHP that enables you to set breakpoints, inspect variables, and step through your code. WordPress Studio includes Xdebug support as a beta feature, powered by WordPress Playground’s WebAssembly version of PHP.
Enabling Xdebug
Xdebug must be enabled in two places: first in the Studio application settings, then for individual sites.
Enable Xdebug in Studio (Beta Feature)
- Click Studio in the menu bar
- Open “Beta Features” menu
- Toggle “Xdebug Support” to enable the feature
- The Xdebug option will now appear in the settings for each site
Enable Xdebug for a site
- Select the site you want to debug
- Navigate to the Settings tab
- Click “Edit site“
- Check the “Enable Xdebug” checkbox
- Click Save
The site will restart automatically with Xdebug enabled.
Important limitations
- Only one site at a time: Xdebug can only be enabled for a single site at once. To enable it for a different site, you must first disable it on the current site.
- Performance impact: Xdebug may slow down site performance. Disable it when not actively debugging.
Using Xdebug with your IDE
Once Xdebug is enabled for a site, you can connect your IDE (code editor) to debug WordPress plugins, themes, and core code.
VS Code setup
- Install the PHP Debug extension
- Create a
.vscode/launch.jsonfile in your project with the following configuration:
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9003,
"pathMappings": {
"/wordpress": "${workspaceFolder}"
}
}
]
}
- Set breakpoints in your code
- Start the debugging session in VS Code (Run → Start Debugging)
- Navigate to your site in the browser to trigger the breakpoints
PhpStorm Setup
- Go to Settings → PHP → Debug
- Verify that the Xdebug port is set to 9003
- Enable “Start listening for PHP Debug Connections” from the toolbar
- Set breakpoints in your code
- Navigate to your site in the browser to trigger the breakpoints
Learn more
For additional information about Xdebug integration, see the WordPress Playground Xdebug documentation.
Studio does not support WordPress Playground’s experimental flags or Chrome DevTools integration at this time.
Last updated: January 13, 2026