Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
35 lines (34 sloc)
1.26 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# == Class: php::remote_debug | |
# This class enables support for remote debugging of PHP code using | |
# Xdebug. Remote debugging allows you to interactively walk through your | |
# code as executes. Remote debugging is most useful when used in | |
# conjunction with a PHP IDE such as PhpStorm or Emacs (with Geben). | |
# The IDE is installed on your machine, not the Vagrant VM. | |
# | |
# | |
# This was formerly a role, but is now enabled on all | |
# MediaWiki-Vagrant installations. | |
# | |
# To use: | |
# | |
# -- In your IDE, enable "Start Listening for PHP Debug Connections" | |
# -- For Firefox, install | |
# https://addons.mozilla.org/en-US/firefox/addon/the-easiest-xdebug | |
# and click "Enable Debug" icon in the Add-on bar | |
# -- Set breakpoints | |
# -- Navigate to 127.0.0.1:8080/... | |
# | |
# See https://www.mediawiki.org/wiki/MediaWiki-Vagrant/Advanced_usage#MediaWiki_debugging_using_Xdebug_and_an_IDE_in_your_host | |
# for more information. | |
class php::remote_debug { | |
package { 'php-xdebug': } | |
php::ini { 'remote_debug': | |
settings => { | |
'xdebug.remote_connect_back' => 1, | |
'xdebug.remote_enable' => 1, | |
'xdebug.max_nesting_level' => 200, | |
'xdebug.remote_log' => '/vagrant/logs/xdebug.log', | |
}, | |
require => Package['php-xdebug'], | |
} | |
} |