Sonntag, 28. April 2013

Aptana für PHP-Debugging verwenden


Dies ist noch eine kurzzusammenschrift der Informationen ...

als erstes Empfehle ich das Softwarepaket AMPPS, dass einen Webserver und verschiedenste
Webseiten und PHP-Versionen enthält.

dann laden wir uns Aptana herunter ..
Danach brauchen wir noch XDebug in der passenden Version zu unserem PHP.
Dieses Speichern wir unter php\ext ab.

jetzt fügen wir in die PHP.ini im Apache Verzeichnis folgendes ein:

[XDebug]
zend_extension="[AMP Path]\php\ext\php_xdebug.dll"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.remote_port = 9000

danach gehen wir nach dieser Anleitung vor:

Enable XDebug in Aptana Studio 3.x

Many of the web developers faced problem to use Aptana Studio as they cannot configure the XDebug in their workstation. Recently I configure my Aptana Studio for XDebug successfully. Here it is:

Requirements:

  1. Aptana Studio 3.2.0 or newer. I use 3.2.2 to demonstrate the tutorial
  2. XAMPP / WAMP/ LAMP or any other web server solutions.
  3. PHP 5.3 or newer.
  4. XDebug is already configured in the php.ini . If the XDebug is not configured in your web server, follow this link. I have discussed the topic in "Configure XDebug" post.

Steps:

  1. Click Window->Preferences
  2. In the Preferences dialog go to Aptana Studio -> Editors -> PHP -> PHP Interpreters.
  3. Click "Add". Add a PHP interpreter by giving the php information. Select the php.exe file from the installed php web server. In this case I have used XAMPP sever.
  4. Don't close the prompt window. Go to Aptana Studio -> Web Servers and Create a new Web Sever by clicking "New". Select Simple Web Server.
  5. Enter the data for the localhost server and click "OK".
  6. Now close the preference window and go to Run ->Debug Configurations from the menu options.
  7. Select the "PHP Web Page" then click New Launch Configuration. Enter the field values and select Apply.
  8. Close the Prompt window.
  9. Now Debug the PHP Project by selecting Debug As ->  PHP Server. Aptana Studio automatically open the Debug Perspective and continue to debug. Now, you can debug your PHP project using XDebug and Aptana Studio. Happy Codding .

Keine Kommentare:

Kommentar veröffentlichen