-
-
Notifications
You must be signed in to change notification settings - Fork 411
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
show object kind, name and address when using dbg! #2960
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2960 +/- ##
==========================================
- Coverage 50.22% 50.11% -0.12%
==========================================
Files 446 446
Lines 46019 46027 +8
==========================================
- Hits 23114 23065 -49
- Misses 22905 22962 +57
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Check the comment to see how we might improve it :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! :)
Just need to run rust-fmt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! This should significantly improve the output of dbg!
.
Co-authored-by: Haled Odat <[email protected]>
Co-authored-by: Haled Odat <[email protected]>
I can do this in a follow up or but I left the recursion stuff in there, I gues that can be removed as it’s not possible for recursion when printing a object now (unless we want to improve the output later on with properties etc) |
While debugging I tend to use |
* show object kind, name and address when using dbg! * Update boa_engine/src/object/jsobject.rs Co-authored-by: Haled Odat <[email protected]> * Update boa_engine/src/object/jsobject.rs Co-authored-by: Haled Odat <[email protected]> * Run `rust-fmt` --------- Co-authored-by: Haled Odat <[email protected]>
This should implement Debug a bit better for objects, previously they recursed a lot and spewed out a lot of garbage. This shows the kind, name and address for each object, which should be enough when investigating issues.
Before:
After:
&func = (Function) "fib" 0x7F9A67F17218