XdebugHelper is a Sublime Text plugin that acts as a helper for the Sublime Text plugin named SublimeTextXdebug.
Tested with Sublime Text Build 3125 and Xdebug 3.1.6
In order to debug PHP via Xdebug, some php.ini
configuration needs to be done
manually. XdebugHelper does that automatically.
When a debugging session is started, php.ini
file is automatically configured as:
[xdebug]
xdebug.mode = debug,profile
xdebug.start_with_request = yes
And when the session is stopped, php.ini
file is reverted back to its original
state.
XdebugHelper will hide GitGutter during debugging in order to make SublimeTextXdebug icons in the gutter visible. This feature applies only if the GitGutter plugin is already installed.
You can install the plugin via:
- Package Manager by searching
XdebugHelper
git clone https://github.com/maliayas/SublimeText_XdebugHelper.git XdebugHelper
- Downloading the zip of the repo and extracting into
Packages/XdebugHelper
You have to define the path of your php.ini
file in your user settings. Multiple
paths are supported.
Open your user settings file via this menu:
Preferences > Package Settings > Xdebug Helper
Usage is transparent. Normally, SublimeTextXdebug plugin starts a PHP debug session via Ctrl+Shift+F9 key binding and stops it via Ctrl+Shift+F10 key binding. XdebugHelper overrides these commands and works automatically once you made the configuration.
xdebug.mode
can be made customizable.- Currently
xdebug.mode
andxdebug.start_with_request
must already exist in yourphp.ini
(their values don't matter). XdebugHelper only finds and modifies them. It would be more convenient to "add" them when they don't exist in the first place.
XdebugHelper is released under the MIT License.