Log any javascript or php variables and it's back stack into file like php function debug_backtrace done. View the variables value and it's back stack info in web browser, and browser will synchronize with the log file using ajax.
Project that allows you to edit various files on a server through your web browser. Has syntax highlighting, and eventually will beable to debug php files through it's interface You can see a sample here: http://www.phpwebbug.org/TestClient/