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

Add extra information to debug logs #2220

Merged
merged 1 commit into from
Aug 2, 2024
Merged

Add extra information to debug logs #2220

merged 1 commit into from
Aug 2, 2024

Conversation

dhdaines
Copy link
Contributor

@dhdaines dhdaines commented Aug 1, 2024

Because WeasyPrint has a lot of very deeply nested recursive call chains, it is super easy to get lost in the code. When adding debugging log messages (which WeasyPrint could really use more of) to trace, it is nice to be able to know what file/line/function they come from.

Possibly useful for bug reporting too?

@liZe
Copy link
Member

liZe commented Aug 2, 2024

To be honest, problems in WeasyPrint can happen in so many places that using the debugger is often the only reliable way to understand what’s going on. Adding extra information in debug logs is a good idea, but I’m not sure that adding more debugging information could actually help to debug without being too verbose.

@liZe liZe added this to the 63.0 milestone Aug 2, 2024
@liZe liZe added the documentation Problems or improvements needed on the documentation or on the website label Aug 2, 2024
@dhdaines
Copy link
Contributor Author

dhdaines commented Aug 2, 2024

To be honest, problems in WeasyPrint can happen in so many places that using the debugger is often the only reliable way to understand what’s going on. Adding extra information in debug logs is a good idea, but I’m not sure that adding more debugging information could actually help to debug without being too verbose.

True! It's possiby just me who has never developed the habit of using the Python debugger 🙂

@liZe
Copy link
Member

liZe commented Aug 2, 2024

True! It's possiby just me who has never developed the habit of using the Python debugger 🙂

😄 pdb is not a perfect debugger, but at least we now have the breakpoint() function in Python to use it easily!

@liZe liZe merged commit 3b6c8ef into Kozea:main Aug 2, 2024
6 checks passed
liZe added a commit to dhdaines/WeasyPrint that referenced this pull request Aug 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Problems or improvements needed on the documentation or on the website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants