Thursday, April 6, 2017
Debugging PHP in Quanta Using xdebug
Debugging PHP in Quanta Using xdebug
Quanta is a full featured KDE programming editor. Quanta now has support for DBGp debugging protocol. Install quanta by by issuing following command.
sudo apt-get -y install quanta
Configuring xdebug
Install xdebug using previous blog post on Debugging PHP using xdebug. After installing xdebug add following configuration options to your /etc/php5/apache2/php.ini.
xdebug.remote_enable = 1 xdebug.remote_handler = dbgp xdebug.remote_mode = req xdebug.remote_port = 9000 xdebug.remote_host = localhost
Now restart your apache using following command.
sudo /etc/init.d/apache2 restart
Configuring quanta
You can debug php scripts only in projects. Create a new project in quanta and add /var/www to it. Open project properties, select DBGp from Debugger combo box and accept remaining default settings. If you followed previous steps and debugging on local machine then you dont have to do anything else. If you have to change debug port and server url then click on Options button and change those settings.
By now you should have a debug menu and debug toolbar. If quanta is ready for debugging then all those debugging buttons on toolbar will be enabled by default. If not then start a new debug session from debug menu in menubar.
From now you can set breakpoints, watch variables and get call stack(backtrace) information during debug session.
download more info
No comments:
Post a Comment