Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log new defined variables for section #7

Open
cadorn opened this issue Mar 29, 2012 · 0 comments
Open

Log new defined variables for section #7

cadorn opened this issue Mar 29, 2012 · 0 comments

Comments

@cadorn
Copy link
Member

cadorn commented Mar 29, 2012

The trace function is a handy tool, however, it gives quite a bit of
information. It would be nice to have a simpler start/end variable
trace that logs each variable one at a time

For example:

$start = array_keys(get_defined_vars());
$end = array_keys(get_defined_vars());
$log_variables = array_diff($start, $end)
foreach($log_variables as $log_variable)
    $console->log($log_variable);

This needs work, I understand. But the point is instead of adding
10-20 separate log statements in a section of code, you could just
have one start/end. This is different from trace(); because in many
PHP frameworks that globally load numerous functions, the trace output
can become muddy when quickly looking for a certain variable value.

Reported: http://groups.google.com/group/firephp-dev/browse_thread/thread/df5f91ac8afd113c

spidgorny pushed a commit to spidgorny/firephp that referenced this issue Mar 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant