How to test/trace execution of PHP scripts?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
pstein
Forum Newbie
Posts: 5
Joined: Mon Apr 20, 2009 6:27 am

How to test/trace execution of PHP scripts?

Post by pstein »

Sorry for this newbie question:

How can I easily test/trace an existing *.php script?

This should be done with a minimum of extra installation/configuration.

I can imagine that there is e.g. a wrapper script "trace.php" which does the job for me similar to

http://localhost/trace.php?testscript=myscript.php

After entering the URL above the trace wrapper script should automatically output the content of all relevant, next used variables BEFORE each command and then execute the next command before proceeding to the next command.

Is this somehow possible?

Thank you
Peter
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: How to test/trace execution of PHP scripts?

Post by Celauran »

Sounds like you want xdebug
Post Reply