In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
PHP CLI application debugging principle is what, many novices are not very clear about this, in order to help you solve this problem, the following small series will be explained in detail for everyone, there are people who need this can learn, I hope you can gain something.
Select a PHP file in Eclipse and right-click Debug As->PHP CLI Application.
CLI application means that this script file does not need any Web server to run, of course, PHP runtime is still required.
We see XDebug in the debug window that pops up:
XDebug is a great tool for debugging PHP. In my folder C:MyAppwampinphpphp5.5.12 there is a php.ini configuration file with this configuration at the end:
; XDEBUG Extension
zend_extension = "C:/MyApp/wamp/bin/php/php5.5.12/zend_ext/php_xdebug-2.2.5-5.5-vc11.dll"
;
[xdebug]
xdebug.remote_enable = off
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.% t.% p
xdebug.profiler_output_dir = "C:/MyApp/wamp/tmp"
xdebug.show_local_vars=0
This actually indicates the location of XDEBUG:
What about Eclipse?
Using Task Manager, when I debugged my PHP CLI application with Eclipse, a PHP.exe process appeared:
Command prompt line:
C:MyAppwampinphpphp5.5.12php.exe -n -c C:Usersi042416AppDataLocalTempphp-inisession2307282238017995350.tmpphp.ini -d asp_tags=off -d short_open_tag=on C:Usersi042416scp20180425 est ewfile.php
-n option: do not use global php.ini file
-c option: Use php.ini specified after-c, i.e. C:Usersi042416AppDataLocalTempphp-inisession 2307282238017995350.tmpphp.ini
-d option: temporarily specify a parameter not found in php.ini, i.e. asp_tags=off
Take a look at this php.ini file that I generated temporarily after I started CLI debugging:
Although there are more than 70 k, but the vast majority of comments are semicolons, only the last few lines are valid information:
Did reading the above help you? If you still want to have further understanding of related knowledge or read more related articles, please pay attention to the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.