User Tools

Site Tools


php:eclipsepdt

This is an old revision of the document!


Eclipse PDT(PHP Development Tool)

Basic Config

Show some basic windows in Eclipse PDT

  • Window→Show View→PHP Explorer
  • Window→Show View→PHP Functions
  • Window→Show View→PHP Project Outline

change between PHP screen and Debug Screen

If you want change to mode PHP for coding or mode Debug for debug, Click button PHP or Debug at top right corner

PHP Editor Config

common config for PHP

Under Window → Preferences:

  • set Encoding UTF-8: Expand left menu to General → Workspace:
    • Check Text file encoding and select:
      Other:
        UTF-8
    • Check New text file line delimiter and select:
      Other:
        Unix
  • Ensure that spaces are used instead of tabs: Expand left menu to General → Editors → Text Editors
    • Check Insert spaces for tabs
    • Change Displayed Tab Width: 2
  • Removing trailing whitespaces: Click left menu PHP→Editor→Save Actions: check Remove trailing whitespace and select All lines

Config to editor Drupal

Config to recognize drupal files

  • Step1: config common config for PHP
  • Step2: config Drupal file types are recognized as PHP files:
    • Under Window → Preferences, Expand left menu to General → Editors → File Associations. Under File Associations on the right click 'content type', Add add the *.engine, *.theme, *.install, *.inc, *.make (for Drush make files), *.module, *.profile and *.test in “PHP Content Type”

Import drupal project

Under menu File→New→PHP Project from Existing Directory

Config debug PHP

  • change debug mode in “Run Configuration”
php/eclipsepdt.1401979792.txt.gz · Last modified: 2022/10/29 16:15 (external edit)