In other words, it seems that var_dump ($ variable) is everywhere! Php is already quite simple, but debugging requires manual writing, which is very troublesome. It seems like var_dump ($ variable) is everywhere!
Php is already very simple, but debugging requires manual writing, which is very troublesome.
Reply content:
In other words, it seems that var_dump ($ variable) is everywhere!
Php is already very simple, but debugging requires manual writing, which is very troublesome.
I also like var_dump. If it is large or engineering, it may be xdebug. However, configuration is too cumbersome and not easy to use.
Debug in vardump or thinkphp
==========
The bug debugging in thinkphp5 basically does not require any other tools to be built in.
However, if you try to use xdebug for other frameworks, you can use the xhprof of facebook if an error occurs and the quick location is displayed automatically.
Var_dump + exit is sufficient
echo ""; print_r($tmp);
Slightly complicated:
The framework debug or xdebug is mainly used to view the executed SQL statements, access controllers, request parameters, and response status.
Suitable for you:
Write debug by yourself. It is estimated that few people do this. You know
Availablevar_dump(),debug_backtrace()And other small libraries that are simply encapsulated by functions. The input and information output results are both direct.var_dump()A lot better. We recommend you try two of them:
Var_dump can be used for simple logic or projects.
For complex logic or projects, debugging with the debug provided by IDE is more advantageous. The PHPStorm debugger is quite good.
How can I post messages everywhere?
Zend debugger
var_dumpdie
Kint zhuyun.
die('f**k')Sometimes used for Binary Search