Reputation: 1459
For example, in my error_log, it says something like:
Error... require, include, a_function, another_function
Basically it tracks each step of the program. I want to implement something like this for debugging purposes. How do I "track" the execution of the program in PHP?
Upvotes: 3
Views: 141
Reputation: 270599
In addition to debug_backtrace()
as mentioned by others, I would recommend installing Xdebug and making use of the code profiler therein. When coupled with a cachegrind application to analyze the profile, you can easily view and page through a full trace of your script's execution with execution times per function call.
Upvotes: 0