-
-
Notifications
You must be signed in to change notification settings - Fork 21k
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
Extra debug details possible? #13335
Comments
Script and line number for print calls would be a nice idea indeed. |
Was discussed in #3884 (although that is badly named and thus hard to find). It was said there that it wouldn't be that hard to do and even tagged as a junior job, however, I have no idea where to start on this. Maybe somebody can make some suggestion on how this could be done? |
There is a One day we should probably implement the line numbering proposed in #3884 as well 😃 |
print_stack() has all the info in it that I would want. But it doesn't take a parameter nor returns a string for custom parsing .. kind of limits it's usefulness. Could it perhaps be get a variant that returns the string that is printed to console instead? |
Implemented by #18976 |
I would like to know if it's possible to print the script + line number along with a
print(something)
call?An example output of this function could be:
The intent is of course to make it easier to trace debug output during development. If you forgot a random print(number) somewhere it can be pretty tedious to find it. It also helps to keep track of what's going on and where when you know where the printouts come from.
Another expansion could be to allow debug printing arrays and objects with clean and readable formatting. Here's an example of an array debug in one of my PHP scripts:
As you can see it's a lot easier to follow what's going one here. What are your thoughts?
The text was updated successfully, but these errors were encountered: