this links may help you :
http://www.codeforest.net/debugging-php-in-browsers-javascript-console
http://sarfraznawaz.wordpress.com/2012/01/05/outputting-php-to-browser-console/