to the official website http://www.xdebug.com/download.php Download
find the corresponding PHP version of Xdebug , behind with TS for thread-safe, native environment Win7 + php-5.5.1-win32-vc11-x64 , the download is Xdebug 2.3.3 PHP 5.5 VC11 TS (with a bit)
installation :
win : dll file here is php_xdebug-2.3.3-5.5-vc11-x86_64.dll) php installation directory of ext folder. This machine is placed in d:\apacheserver\php\ext\
in the Create a new xdebug folder under apacheserver, and then create a new trace under xdebug Profiler folder, which is used to store Xdebug Two types of information generated
edit php.ini, add the following lines
Zend_extension = "D:\ApacheServer\php\ext\php_xdebug-2.3.3-5.5-vc11-x86_64.dll"
; Allow remote IDE Debug
Xdebug.remote_enable = True
; Remote host
Xdebug.remote_host = 127.0.0.1
; xdebug.remote_port = 9000; Default Port 9000
Xdebug.profiler_enable = On
; temporary trace information output
Xdebug.trace_output_dir = "D:\ApacheServer\xdebug\trace"
Xdebug.profiler_output_dir = "D:\ApacheServer\xdebug\profiler"
; remaining Parameters
; Turn on automatic tracking. Automatically turns on the " monitor function call process " Mode. This function can output the monitoring information of a function call as a file in the directory you specify
Xdebug.auto_trace = On
; turn on exception tracking
Xdebug.show_exception_trace = On
; Turn on remote debugging Auto-start
Xdebug.remote_autostart = On
; Collection Variables
Xdebug.collect_vars = On
; Collect return Values
Xdebug.collect_return = On
; Collect Parameters
Xdebug.collect_params = On
; Show Local Variables
Xdebug.show_local_vars = On
; Display the default error message
Xdebug.default_enable = On
; used to Zend Studio Application layer communication protocol for remote debugging
Xdebug.remote_handler = DBGP
; If set too small , a function that has recursive calls to itself too many times will report more than the maximum number of nested errors
Xdebug.max_nesting_level = 10000
Zend_extension = "D:\ApacheServer\php\ext\php_xdebug-2.3.3-5.5-vc11-x86_64.dll" and Zend Debugger same
different systems and PHP version has different wording
Linux and Mac OS x:zend_extension = "D:\ApacheServer\php\ext\php_xdebug-2.3.3-5.5-vc11-x86_6 4.dll "
Windows thread-safe Edition php:zend_extension_ts = "D:\ApacheServer\php\ext\php_xdebug-2.3.3-5.5-vc11-x86_6 4.dll "
Windows non-thread-safe Edition php:zend_extension = "D:\ApacheServer\php\ext\php_xdebug-2.3.3-5.5-vc11-x86_ 64.dll "
so the same server can only load one debugging tool, or Zend Debugger or Xdebug
but in PHP5.5 Environment test, thread-safe version of PHP can not add _ts can only be written Zend_extension =
Xdebug.profiler_enable = on and the following directory "D:\ApacheServer\xdebug" function is to open the execution of the analysis file to the specified directory functions, can be set freely. You don't write .
generated files, such as cachegrind.out.4408 files named in this format, can be opened with the editor to see details about how many programs run
restart Apache
Restart
Write a program that can cause an error to occur, such as trying to include a file that does not Exist.
<?phprequire ' abc.php ';? >
then through the browser access, surprised to find that the error message has become color, and XDEBUG Tracking Code Execution
Zend Studio Settings
Zend Studio 10.6.2
Apache2.4.4
Modify Zend Studio Settings
window->preferences->php->php Executables->add
fill in the contents as follows, Executable path Select file after PHP INI file (optional) automatically assigned value
name:php 5.5.1_CLI
Executable Path:d:\apacheserver\php\php.exe
PHP INI file (optional): D:\ApacheServer\php\php.ini
SAPI TYPE:CLI
PHP Debugger:xdebug
Click The default is automatically after Finish is saved
( if only CLI Debugging is required, This step can be ignored ) Click PHP Server drop- down Box Default PHP Web Server on the Right. PHP Servers ...
selected name| URL list, Click Edit on the right
in the pop-up box Debugger drop- down box, select XDebug
Start debugging
Double-click on the left row column in your code to add a breakpoint
Run->debug configurations ...
Double click PHP CLI Application
in the Enter the name you want, Click Browseon the right side of the PHP file , select the fileyou want to debug , and click Apply can
or open the page you want to run
Run->debug as->php CLI Application
that is, you can run in debug mode or you can choose Other debug modes outside the CLI
Click the toolbar down arrow (Step into) or press F5 executes row by Line. Click the green right arrow on the left (Resume) or press F8 to continue until you stop at the breakpoint
Click on the red button (Terminate) End debugging, Then click the Bug button to start debugging again
PHP Add xdebug Extension