notepad++ Debugging PHP with DBGP

Source: Internet
Author: User
Tags phpinfo



1. Use Phpinfo (); View PHP version information









2. Configure Xdebug



2.1 According to PHP version information, download the corresponding xdebug.









2.2 Place the downloaded Php_xdebug-2.1.2-5.3-vc6.dll file in the Ext directory under the PHP installation directory.






2.3 Add the following configuration in php.ini:





 
[xdebug]
zend_extension = "D:/LAMP/PHP535/ext/php_xdebug-2.1.2-5.3-vc6.dll"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.idekey=matas
xdebug.remote_log="d:\temp\xdebug\xdebug.log"
xdebug.show_exception_trace=0
xdebug.show_local_vars=9
xdebug.show_mem_delta=0
xdebug.trace_format=0
xdebug.profiler_enable  = 1
xdebug.profiler_output_dir ="d:\temp\xdebug"





2.4 Restart the Apache server via Phpinfo () and see if there are any Xdebug related output information.






3. Configuring the DBGP Plugin



3.1 Download the latest version of the DBGP plugin https://sourceforge.net/projects/npp-plugins/files/DBGP%20Plugin/






3.2 Copy the extracted DLL files to the plugins directory in the notepad++ installation directory and reopen the notepad++.






3.3 In the "Plugins" menu bar will appear dbgp submenu, select Config, enter the configuration.









The IDE KEY is the same as the Xdebug.idekey configuration in php.ini.






3.4 Opening the plugin->dbgp->debugger






Clicking on the red dot adds a breakpoint to the line where the cursor is located.






3.5 Add after the URL of the page you want to debug? Xdebug_session_start=session_name



Example: HTTP://LOCALHOST/TEST.PHP?XDEBUG_SESSION_START=ABCD









Reference: http://thecancerus.com/debugging-php-using-xdebug-and-notepad-part-i/



notepad++ Debugging PHP with DBGP


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.