OFF-SOFT.net

This site is support & information site of WEB,and Software. This site might help you that create software or Web Site…perhaps?

php debug environment (XDebug)

Published on| April 7th, 2009 | No Comment.


php to do with language development, Visual Studio IDE, such as the environment is often not required.

And the emergence of Eclipse, php environment, compared to the original lot, which has.

This is a debugging environment for free, Windows increase the amount of debugging information about XDebug easily, try to collect information and describes a simple configuration and debugging.

STEP.1 environment

On the environment, already on the Apache + php on Windows WEB recommend the story as those in place.

  1. Check out the current version of php

    1
    
    <?php phpinfo(); ?>

    Debugging environment of the source image (WEB server's root directory) to copy, WEB and can be accessed via the php version.


  2. XDebug php to the version of the following URL to download from
    http://www.xdebug.org/download.php
    ※ Windows binaries: 5.2 VC6 Non-thread-safe, 5.2 VC6, 5.3 VC6 Non-thread-safe, 5.3 VC6, 5.3 VC9 Non-thread-safe, 5.3 VC9
    And from that description, php for example if a 5.2.xx version, "5.2 VC6" I will definitely download it.

    The VC6/VC9, Visual C + + version of the actual binary file (dll) to create a version using.

    VC6 environment is, XP is the standard, VC9, note that it can not work unless you install on your own.

  3. Perhaps the file is set to the php environment

    php_xdebug-xxxxxxx.dll

    I think that you are downloading a file name like.

    1. Php file extention to copy the environment directory

      例)  copy php_xdebug-xxxxxxx.dll c:\php\\ext\.

    2. rewrite the php.ini
      php.ini is usually, php be installed beneath.

      "extension = xxxxx.dll" after the description, and appended the following to save it.

      例) zend_extension_ts="C:\PHP\ext\php_xdebug-xxxxxxx.dll"

      ※ Be sure to specify a full path.

    3. Apache to restart the
    4. STEP.1 check the php version used in the php file to access via the WEB

      Thus if XDebug notation shows that it is installed correctly.

      If you do not see the above output, STEP.1 whether it is correct from the instructions, again, let's review.

STEP.2 try to collect debugging information

In fact, php output when a warning message or error message, change the following message.


Can you summarize in the table to clean up the call stack.

In addition, WEB debugging is cumbersome, difficult to put the debugging information when the browser window inside the loop.

It's, XDebug, such as: using the API, you can easily spit out debugging information.

1
2
3
4
$item  = $menu-->getItem($itemid);
 
xdebug_debug_zval('itemid');
xdebug_debug_zval('item');

xdebug_debug_zval: debugging information to convert the information to the API stack
Above, $ itemid $ item and something that will discharge the work area.

The output of the following characters to do this, it makes it easier to debug.

itemid:

(refcount=2, is_ref=0),string '65' (length=2)

item:

(refcount=1, is_ref=0),null

Personally, to debug a little, and appreciated.

Open source, especially when I bumped into some problems, to trace a little bit, and I think we have enough features.

Here, the introduction is only a description of the elevator.

Please look at documentation for you if you want detailed information.

http://www.xdebug.org/docs/



Add to your favorites(bookmarks): はてなdel.icio.usLivedoor ClipYahoo!FC2Nifty ClipPOOKMARK. AirlinesBuzzurl(バザール)Choixnewsing

Trackback URL

After Admin approves this comment, it will be shown.


Comments

Leave a Reply








Tag Cloud

Links

Site Description

This site is support & information site of WEB,and Software. This site might help you that create software or Web Site…perhaps?

Add to your favorites(bookmarks)

はてなdel.icio.usLivedoor ClipYahoo!FC2Nifty ClipPOOKMARK. AirlinesBuzzurl(バザール)Choixnewsing