barbushin / php-console

Handle PHP errors, dump variables, execute PHP code remotely in Google Chrome
https://chrome.google.com/webstore/detail/php-console/nfhmhhlpfleoednkpnnnkolmclajemef
MIT License
1.34k stars 283 forks source link

source of chrome extension #87

Closed ffflabs closed 9 years ago

ffflabs commented 9 years ago

Hi @barbushin

I wonder, where do you keep the source code for the chrome extension? If you don't want to publish it I understand, of course. However, I just wanted to see how hard would it be to make it use console.info, console.warn and console.debug instead of just console.log, depending on the backend tag. Maybe change colors as well.

barbushin commented 9 years ago

I'm working on next version of extention, so old source code is kind of deprecated. Before I though about using console.info, but it will looks not so nice as it is now. Also I don't think that there is a good idea to separate E_WARNING and E_ERROR like different level errors. As for me all of them are enough critical, even E_NOTICE sometime is critical, so I think they should be colored in the same way :)

ffflabs commented 9 years ago

Yeah, I didn't mean the error handler. Errors and exceptions should still be console.errors and display in red.

But I thought that maybe there would be a way to bind specific tags to console methods. For example accepting a fourth parameter for \PhpConsole\Handler::debug which defaults to 'log' but can also be 'info', 'debug','warn'.

Perhaps even console.table and console.time / timeEnd could be used this way.

barbushin commented 9 years ago

Yeah, that's gonna be in the next version. console.table also :)