PHP Debug Memo

Source: Internet
Author: User
Tags configuration php php server php debug php web server
PHP Debug Configuration is actually very simple, the following is just a memo.
1.ide use eclipseforphp. First download a php_xdebug-2.2.3-5.4-vc9.dll, and add in php.ini:




[XDebug]
Zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
Xdebug.profiler_append = 0
xdebug.profiler_enable = 1
Xdebug.profiler_enable_trigger = 0
Xdebug.profiler_output_dir = "C:\xampp\tmp"
Xdebug.profiler_output_name = "cachegrind.out.%t-%s"
Xdebug.remote_enable =1
Xdebug.remote_handler = "DBGP"
Xdebug.remote_host = "localhost"
Xdebug.remote_port = 9000
Xdebug.remote_mode = "req"
Xdebug.auto_trace = On
Xdebug.show_exception_trace = On
Xdebug.remote_autostart = On






This adds debugging functionality to PHP.




2. In the eclipseforphp inside the preferences, first in the PHP executable inside the configuration Php.exe location and php.ini location, and then select Debuger in PHP xdebug.


This adds the PHP execution environment with debugging functionality to the eclipseforphp.




3. At Php-debug, first select XDebug at PHP debuger and then select the PHP execution environment in the previous step in PHP excutable.




This phpforeclipse has the ability to debug PHP scripts. When debugging, select the entire PHP project right-click, configure a PHP script configuration,
RunTime PHP Select alternate php, drop-down box to select the previous configuration of the PHP execution environment, and then select the php file to debug the php script.










4. If you are debugging PHP Web Page, you need to configure the default PHP Web Server in PHP servers of your preferences.


Server tab, select an identity name, and then enter the HTTP address to access Web root below, which you need to pay special attention to,
In general, when operating, you need to modify the DocumentRoot and httpd.conf files in Apache.
A Custom workspace directory (for example: E:/WS), let Apche execute the project under E:/ws directory,
For example, if a project name is Weixin, then after the configuration is started Apache, we need to access the project through Http://localhost:8080/weixin, actually access the E:/WS
/weixin the following PHP file. )
The HTTP address of the input Web root is similar to the following: http://localhost:8080, and then in the Path mappping tab, enter the specific URL path to access the item and the path to the project in the workspace, for example: path on The Server is Http://localhost:8080/weiqin, and Path in WorkPlace is/weiqin.




This way, we can use Web page debugging. When the Web page is debugged, right-click the project, select Debug->php Web page, and add a new configuration.




Server Debugger Select xdebug,php Server to select the Default PHP Web Server, and then in file select the files you want to debug to debug.
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.