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

Install Xdebug with NginX Server

By editor , 24 July, 2017
Question

How to install and configure Xdebug On NginX with an IDE like Netbeans, Phpstorm ... ?

Install Xdebug php

sudo apt install php-xdebug

Configure Xdebug

Example:
sudo gedit /etc/php/5.6/mods-available/xdebug.ini

Add (Example)
zend_extension=xdebug.so
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.var_display_max_depth = -1
xdebug.var_display_max_children = -1
xdebug.var_display_max_data = -1
xdebug.idekey = "netbeans-xdebug"

Restart nginx and php-fem (here php5.6-fpm)

sudo /etc/init.d/nginx restart
sudo /etc/init.d/php5.6-fpm restart
# OR
sudo service nginx restart
sudo service php5.6-fpm restart

Configre IDE (Here Netbeans)

Goto Tools->Options->PHP->Debuging
Set session ID and Debugger Port if different.

Note : Check 'Stop at first line' to test, then uncheck if you do not need.

Tips

On netBeans:
Run your project in debug mode (Ctrl + F5)
View Variables
Step over ( F8 )
Step Into ( F7 )
Step Out ( Ctrl + F7 )
Run to cursor ( F4 )
Continue ( F5 )

 

Tags

  • Debug
  • IDE
XDebug - Install and configure with NetBeans
Debug and Display errors. PHP Apache Mysql Xdebug

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