Xdebug - PHP Debugger
Xdebug is a PHP extension for powerful debugging (a PHP Debugger). It supports stack and function traces, profiling information and memory allocation and script execution analysis
Step 1. Prepare PHP Development Environment
Using XAMPP for develop PHP. Get XAMP.
Step 2. Check Xdebug Extension
In your XAMP directory (e.g. D:\xampp), Xdebug was added for default. Please check file php_xdebug.dll in D:\xampp\php\ext
If file is not exist or your need change Xdebug version. You can download Xdebug for Windows from xdebug.org.
And then copy downloaded file to D:\xampp\php\ext
Step 3. Config Xdebug for XAMP
Open your php.ini that is easily find in D:\xampp\php\
Find [XDebug] and remove all semicolon ";" in it's block. And set xdebug.remote_enable = 1
If [XDebug] block is not exist. Please add following lines at end php.ini
[XDebug] zend_extension = "D:\xampp\php\ext\php_xdebug.dll" xdebug.profiler_append = 0 xdebug.profiler_enable = 1 xdebug.profiler_enable_trigger = 0 xdebug.profiler_output_dir = "D:\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.trace_output_dir = "D:\xampp\tmp"
Step 4. Config Xdebug for Netbeans
Go to Tools > Options. A Options dialog box will appearance
In Option dialog. Choose Tab PHP. In sub Tab choose Debugging.
Please config Debugging:
Debugger Port: 9000 Session ID: netbeans-xdebug Maximum Data Length: 2048
Comments
Post a Comment