PHP XDebug Sublime Text Single-step debugging, Xdebugsublime
Pre-environment: The LNMP has been installed.
1. Installing Xdebug
Can be installed through Pear package management
sudo apt-get install Php-pear
sudo pecl install Xdebug
Here we install directly via apt
Apt-get Install Php5-xdebug
The program has automatically created the default configuration file
Configuration:
Xdebug.ini Location:/etc/php5/mods-available/xdebug.ini
Add the following
zend_extension= "/usr/lib/php5/20131226/xdebug.so"
Xdebug.profiler_output_dir=/tmp
Xdebug.profiler_output_name=cachegrind.out.%p
Xdebug.profiler_enable_trigger=1
Xdebug.profiler_enable=true
Xdebug.remote_enable=true
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
Xdebug.remote_handler=dbgp
Xdebug.remote_mode = req
Xdebug.remote_connect_back = 1
Xdebug.remote_autostart=0
Xdebug.collect_vars = On
Xdebug.collect_params = On
Xdebug.auto_trace = On
Xdebug.show_exception_trace = On
Xdebug.trace_output_dir=/tmp
Restart PHP5-FPM
/ETC/INIT.D/PHP5-FPM restart
2. Turn on commissioning
Sublime CRL+ALT+F9 Open the Debug interface
View Port 9000
3. Testing
Create File test.php
for ($i =0; $i < $i + +) {
echo $i;
}
?>
Access http://127.0.0.1/test.php in the browser
Where we can see the breakpoint $i = 0
Shift+f8: Open the Debug panel
F8: Open the debug panel quick Connect
Ctrl+f8: Toggle Breakpoint
CTRL+SHIFT+F5: Run to the next breakpoint
CTRL+SHIFT+F6: Single Step
Ctrl+shift+f7: Step Into
Ctrl+shift+f8: Step Out
Ctrl+shift+f7
This address: http://www.cnblogs.com/martin-tan/p/4921200.html
PHP x-debug File
Ubuntu below has kcachegrind directly open, convenient trace file loading order
http://www.bkjia.com/PHPjc/1065786.html www.bkjia.com true http://www.bkjia.com/PHPjc/1065786.html techarticle PHP XDebug Sublime Text Single-step debugging, Xdebugsublime pre-environment: already installed LNMP 1. Installation XDebug can be installed via Pear Package Manager sudo apt-get install php-pear Sud o pecl I ...