Skip to main content
Drupal 8

Main navigation

  • Home
    • Question And Answer
    • NEWS
    • Projects
  • Tutorials - Drupal
    • Android
    • Other
User account menu
  • Log in

Breadcrumb

  1. Home

XDebug - Install and configure with NetBeans

By editor , 24 January, 2016
Question

How to install and configure Xdebug With an IDE (NetBeans, PHPStome ...) ?

Step 1. Install Xdebug
If not already ainstalled, Install Xdebug (I'ts already on the package WAML, LAMP, MAMP)
In Linux Debian/Ubuntu/Mint
# sudo apt-get install php5-xdebug

Step 2. Configure the server
Open php.ini and add:
[xdebug]
;The path to the xdebug extention , If not already added
;zend_extension=/usr/lib/php5/20090626/xdebug.so
;zend_extension=xdebug.so

xdebug.remote_enable=on
xdebug.remote_handler="dbgp"
xdebug.remote_port=9000

;IP of your debuging computer (127.0.0.1 if you use a local server)
;NOTE : Ff you use a VirtualBox VM, Probably you can use the 127.0.0.1 IP
xdebug.remote_host=127.0.0.1
;A key to identify your IDE
xdebug.idekey="netbeans-xdebug"
xdebug.remote_connect_back=1

Step 3. Configure your IDE
On Netbeans, Project properties->Run Configuration -> Project Url (Set project URL

Step 4. Configure web browser
- Install xdebug extention on your web browser (On FireFox / Chrome ...)
- Configure with your IDE Key : netbeans-xdebug

Finally, (on NetBeans)

  • Add a BreackPoint (where you want !!!)
  • Run your project in debug mode (Ctrl + F5)
  • You can:
    • View Variables
    • Step over ( F8 )
    • Step Into ( F7 )
    • Step Out ( Ctrl + F7 )
    • Run to cursor ( F4 )
    • Continue ( F5 )

Tags

  • Server
  • Debug
Install Xdebug with NginX Server

Comments

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.

Links

  • Drupal.org
  • Drupal core release cycle
  • Drupal events with ease
  • Unit test with Drupal using PHPUnit (Drupal 10)
  • Tokens for file upload url
  • Tips for Docker
  • CKEditor inline image files usage for custom forms.
  • Install Docker on Linux Mint
  • Install PHP 8.1
  • Drupal Security Best Practices
  • Order and sort items with tabledrag
  • Add a custom service YAML container
  • Apply a patch with composer