Herd Xdebug Toggler: Manage Xdebug in Laravel Herd with VS Code

Herd Xdebug Toggler is a Visual Studio Code extension created by Patrick Levesque for managing Xdebug configurations in Laravel Herd. Its primary function is to enable or disable the Xdebug PHP extension in Herd's PHP configuration files.

This extension provides value, particularly for developers using VS Code without a Herd Pro license. While Herd Pro with PHPStorm already includes this functionality, Herd Xdebug Toggler offers a solution for those who need Xdebug capabilities in the free version.

Features

  • Enable or disable the Xdebug extension for the current project's PHP version using the command palette.
  • Automatically detects breakpoint changes or debug sessions and toggles the Xdebug extension for the current project's PHP version.
  • Restarts Herd services seamlessly when required to apply changes.
  • Customizable detection modes: Choose between detecting breakpoint changes or debug sessions to toggle Xdebug.
  • Support for macOS and Windows.

Installation

Install this extension from the VS Code Marketplace.

Note: You still need to manually add the following to your php.ini in your Herd install:

xdebug.mode=debug,develop
xdebug.start_with_request=yes
xdebug.start_upon_error=yes`

When enabled, the extension will display notifications whenever Xdebug is enabled or disabled.

Learn more about this extension and view the source code on GitHub.

VS Code Marketplace

GitHub Source Code