-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
dbg!
: also print column
#114910
Comments
@rustbot claim |
This section from the RFC is quite relevant, Excluding the column number:
|
while I agree with the fact that often there is only one debug statement a line, i think that there is one major benefit that the rfc overlooked: users can directly jump to the pertinent debug statement through one unified method regardless of what additionally, the rfc failed to acknowledge the case above as being an ambiguous situation when using solely line numbers. all this combined with the fact that
means that it seems like a pretty sensible addition to the macro. |
adds a column number to `dbg!()` this would be very nice to have for a few reasons: 1. the rfc, when deciding not to add column numbers to macro, failed to acknowledge any potential ambiguous cases -- such as the one provided in rust-lang#114910 -- which do exist 2. would be able to consistently and easily jump directly to the `dbg!()` regardless of the sutation 3. takes up, at a maximum, 3 characters of _horizontal_ screen space fixes rust-lang#114910
I just found myself writing
only to discover that the
dbg
macro in fact only prints the source line and not the column of the macro start or something like that 😅Is it possible to add the column as well?
The text was updated successfully, but these errors were encountered: