IDE INTEGRATION with VAGRANT - pierregermain/MyDrupal GitHub Wiki
Pasos:
Desde Vagrant
- Instalar Xdebug
apt-get install php5-xdebug
- Ver donde esta el php.ini
Desde página web
<?php
phpinfo();
?>
Con la terminal
php --ini
- Modificar fichero ini. Debe aparecer al final del mismo lo siguiente:
;;;;;;;;;;;;;;;;;;;;;;;;;;
; Added to enable Xdebug ;
;;;;;;;;;;;;;;;;;;;;;;;;;;
; use the following command to find xdebug.so:
; find / -name 'xdebug.so' 2> /dev/null
zend_extension="/usr/lib/php5/20090626/xdebug.so"
xdebug.default_enable = 1
xdebug.remote_enable = 1
xdebug.remote_handler=dbgp
xdebug.remote_host=33.33.33.1;sería nuestro local
xdebug.remote_port = 9000
xdebug.remote_autostart = 1
xdebug.idekey = "vagrant"
xdebug.remote_connect_back = 1
xdebug.remote_log="/var/log/xdebug/xdebug.log"
- Reinciar Php.
sudo service apache2 reload
sudo service apache2 restart
Si no sabemos hacerlo simplemente ... 4. vagrant provision 5. vagrant halt 6. vagrant up
Configuración de PHPStorm
- Seleccionar View > Toolbar para ver el Toolbar
- Ahora si, podemos ir a preferencias/configuración, una vez dentro añadir
- un servidor: añadir server (con IP y puerto)
- darle a use path mapping
- añadir el absolute path para el path absolute de vagrant
-
Meter un breakpoint por ejemplo en el theme desde el IDE.
-
Darle al botón listen desde el IDE.
-
Recargar la página correspondiente al theme donde este el breakpoint.
Configuración de Aptana
-
Primero ver si los siguientes ficheros se abren con el Internat PHP Editor
- *.module
- *.install
- *.theme
-
Drupal API
http://knackforge.com/blog/vannia/setting-aptana-studio-3-ide-drupal-development
- Ruble Drupal-Bundle-for-Aptana:
Hay dos formas de instalarlo. Esta es la forma manual:
cd Documents/Aptana\ Rubles/
git clone clone [email protected]:HollyIT/Drupal-Bundle-for-Aptana.git
-
Hooks https://www.drupal.org/project/eclipse http://drupal.stackexchange.com/questions/6909/what-php-ide-do-you-use-that-autocompletes-the-name-of-drupal-functions
-
Si no funciona el autocomplete: Bajar y Extraer Drupal en alguna ruta Window->Preferences->Aptana Studio->Editors->PHP->Libraries seleccionar"New user library". Meter el Drupal extraído.
First, you attach Drupal as a PHP resource for projects (Preferences -> Aptana Studio -> Editors -> PHP -> Libraries). Personally, I keep copies of most of the versions of Drupal on my machine. I then create a resource for each version, as I may be working on sites that aren't always at the latest version. I then configure my project buildpath (Project -> Properties -> PHP Buildpath) to use project specific settings (Libraries tab) and select the version of Drupal I am using. This will give you autocomplete.
Windows
php.ini
zend_extension="C:\Program Files (x86)\DevDesktop\php5_6\ext\php_opcache.dll"
zend_extension="C:\Program Files (x86)\DevDesktop\php5_6\ext\php_xdebug-2.3.2-5.6-vc11.dll"
(...)
[Xdebug]
xdebug.remote_enable=1
xdebug.remote_port="9000"
xdebug.profiler_enable=1
xdebug.profiler_output_dir="C:\temp"
Y configurar el Interprete en la configuración de tu IDE, nada de remote servers.