1. During the execution of the program, record the variables you want to track, the call stack and the parameters of each function call in the corresponding places.
Record this information to the file in a certain format, one variable per line, specific data format Please refer to the code, I won’t go into details here.
2. Now you have all the information (including call stack and parameters) every time the variable is recorded. When you access this program through the browser, this program will read the entire file Analysis,
Display all your debugging information on the page, and it will dynamically refresh with ajax to keep synchronized with your debugging.
Draw a picture, it will be much clearer.
BackTrace is the call stack information. It is not reflected in the picture, it is dynamically refreshed by ajax.
Function:
A few more screenshots of the local machine will be explained:
1. Include files, debugging variables (the above is the program, the following is apache_request_headers() Debug output)
2. Call stack list of a certain function in the drupal system
3. Call parameters of a certain function in the stack
Postscript:
Program It basically implements the functions of debugging and tracking PHP variables, and also comes with the function of viewing call stacks and call parameters.
Nowadays, echo, print_r, var_dump and other system functions are rarely used for debugging output unless necessary. Basically, you can get what you want with this.
Especially for complex systems like drupal, you can clearly know how the program is executed.
Note:
The program is written in php4 , tested on php4.4.8, 5.2.5, and theoretically supports php4, php5.
It has also been tested on linux, window, ie6-7, and firefox, but I still can’t guarantee that it will not work in your environment. If there is an error, please correct it yourself.
Please do not let the log file exceed 5M in size, the browser may crash.
Thank you for reading. For more related articles, please pay attention to the PHP Chinese website (www.php.cn) !

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

WebStorm Mac version
Useful JavaScript development tools

Atom editor mac version download
The most popular open source editor

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software