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

Printing multiple values on one line #139

Open
MrQubo opened this issue Aug 24, 2024 · 3 comments · May be fixed by #140
Open

Printing multiple values on one line #139

MrQubo opened this issue Aug 24, 2024 · 3 comments · May be fixed by #140

Comments

@MrQubo
Copy link

MrQubo commented Aug 24, 2024

I would prefer that dbg(a, b, c) prints values in one line, instead of three separate lines. This makes output much easier to read in my opinion. This shouldn't be hard to implement and users can choose what they prefer by defining some macro setting like DBG_MACRO_SINGLE_LINE.

@MrQubo
Copy link
Author

MrQubo commented Aug 24, 2024

I'll make a PR later.

@MrQubo MrQubo linked a pull request Aug 26, 2024 that will close this issue
@MrQubo MrQubo changed the title Printing multiple values in one line Printing multiple values on one line Aug 26, 2024
@sharkdp
Copy link
Owner

sharkdp commented Oct 1, 2024

Thank you for your request. I'd rather not add even more configuration options to dbg-macro. Either we agree to print them on separate lines or on a single line. Can you show screenshots comparing the two variants and argue why you like the single-line output better?

@MrQubo
Copy link
Author

MrQubo commented Oct 1, 2024

single line:
Screenshot_20241001_162216
multi line:
Screenshot_20241001_162328

I think it's more readable to have values related to each other on one line. Like with c, r, and num[c][r]. Without configuration option it's still possible to print values one per line by calling dbg() separately. So, instead of dbg(c, r, num[c][r][0]);, write dbg(c); dbg(r); dbg(num[c][r][0]);. I think the values are usually related if I write them in a single call to dbg() macro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants