Xdebug+ZendStudio配置,xdebugzendstudio
原文链接:http://www.orlion.ga/689/
好久之前就知道有这么个东西,但是一直没用,一直用exit()、var_dump() debug,效率很低。
首先下载xdebug的dll文件(Window环境下)网址是:https://xdebug.org/download.php,此次下载的是php_xdebug-2.3.3-5.5-vc11-x86_64.dll。(这是个线程安全版的)下载完成后放到php安装目录的ext文件夹下。然后再配置php.ini添加这么几行:
XDEBUG Extension zend_extension="C:\wamp\bin\php\php5.5.12\ext\php_xdebug-2.3.3-5.5-vc11-x86_64.dll" ;允许远程IDE调试 xdebug.remote_enable=true ;远程主机 xdebug.remote_host=127.0.0.1 xdebug.profiler_enable=on ;临时跟踪信息输出 ;xdebug.trace_output_dir="C:\wamp\xdebug\trace" ;xdebug.profiler_output_dir="C:\wamp\xdebug\profiler" xdebug.auto_trace=On ;开启异常跟踪 xdebug.show_exception_trace=On ;开启远程调试自动启动 xdebug.remote_autostart=On ;收集变量 xdebug.collect_vars=On ;收集返回值 xdebug.collect_return=On ;收集参数 xdebug.collect_params=On ;显示局部变量 xdebug.show_local_vars=On ;显示默认的错误信息 xdebug.default_enable=On ;用于zend studio远程调试的应用层通信协议 xdebug.remote_handler=dbgp ;如果设得太小,函数中有递归调用自身次数太多时会报超过最大嵌套数错 xdebug.max_nesting_level=10000
可参考:http://www.cnblogs.com/dreamhome/p/3218744.html,http://blog.csdn.net/xinzheng_wang/article/details/37930233
然后配置ZendStudio(这里是ZendStudio 12.5.1):
-
Window->Preferences->PHP->PHP Executables->Add如下:
-
Window->Preferences->PHP->Debug:
上图中的PHP Server:wamp_apache是之前配置好的,最好配置一个
-
然后就可以创建文件加断点,然后文件右键->Debug as->PHP CLI Application。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Dreamweaver CS6
Visual web development tools
