Showing posts with label Netbeans. Show all posts
Showing posts with label Netbeans. Show all posts

Thursday, 17 April 2014

How to Cofigure Xdebug in Netbeans for Debugging.

Cofigure Xdebug in Netbeans for Debugging.

Step 1: Install the Xampp Latest Version. in this post I have Installed Xampp in the D:\xampp Directory.

Step 2: Search for the file php_xdebug.dll in the following directory D:\xampp\php\ext 

           If the file exist then you dont have to download the xdebug file otherwise you have to download the file from the following URL: (http://xdebug.org/download.php)

Step 3: open php.ini file from the directory D:\xampp\php. In that file search for the name Xdebug or scroll down to the last section of the page containing code for Xdebug configuration.



Uncomment the above lines by removing the semicolen(;) in the start of the line and change the these code into following:

[XDebug]
zend_extension = "D:\xampp\php\ext\php_xdebug.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "D:\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.trace_output_dir = "D:\xampp\tmp"
xdebug.idekey="netbeans-xdebug" 
xdebug.remote_port = 9000

make sure to check the zend_extension refers to the php_xdebug.dll and check for the direcory names and change the xdebug.remote_enable = 1 (from 0) and add the following two lines in the end.

xdebug.idekey="netbeans-xdebug" 
xdebug.remote_port = 9000

These two lines refers to the netbeans Session Id and Debuger Port as follows.



Uncheck the Stop at First Line to avoid the debug point goes to first point of the debug.

Now the debug starts..



and the debugging works..


Related Links:

How to configure / install PHP Yii Framework on Netbeans

How to configure / install PHP Yii Framework on Netbeans

Configure / install  PHP Yii Framework on Netbeans:

Softwares Required:

1. Netbeans Latest Version - (https://netbeans.org/downloads/)
2. PHP Yii framework plugin for Netbeans - (http://plugins.netbeans.org/plugin/47246/php-yii-framework-netbeans-phpcc)
3.Yii Framework - (http://www.yiiframework.com/)

Configuration Steps:

Step 1: Download Netbeans latest version and install it.

Step 2: Install PHP Yii Framework plugin in netbeans.
            Open Netbeans and go to Tools -> Plugins -> and Click Download Tab.
            There you can find Add Plugins.. button and browse fo the Yii framework plugin that downloaded.
            Then select that plugin and click the Install button. It will install the Yii Framework in netbeans.

Step 3: Configure Yii framework on Netbeans.

            In Netbeans, go to Tools -> Options -> and Click PHP Tab.
            Inside PHP tab there is tab called Yii. If the Yii tab appears then that means we installed the PHP Yii framework correctly.

            Before that, download the Yii framework and extract the source file and name that folder into Yii and save that folder somewhere near to web root Directory. I have Installed the Xampp in the D:\xampp Directory.

            Now in Netbeans Yii tab you have to add Yii script. Browse for that yii framework you downloded and find the following file inside that framework Yii\framework\yiic.php.





            In PHP tab make sure you provide the PHP Interpreter by Go to General Tab inside PHP Tab and Browse for the php.exe file that is installed in the Xampp Directory D:\xampp\php\php.exe.





Step 4: Create New PHP Project on Yii Framework.

           Select File -> New Project -> and Choose PHP Application -> Name the Project -> Verify Configuration -> In PHP Framework Select Yii PHP Web Framework -> Finish and the Project created.



































Related Links:

How to Cofigure Xdebug in Netbeans for Debugging