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

Is there a way to print the line number while console.log'ging a single line? #3284

Closed
carbon-starlight opened this issue Feb 22, 2024 · 3 comments

Comments

@carbon-starlight
Copy link

carbon-starlight commented Feb 22, 2024

I was recommended rich's console.log() as a way to add to a print statement output the number of the line of the print statement itself. With console.log(some_array) the number of it's line is indeed being printed — after a column next to filename. But when I console.log() a single string there is no line number being printed. Is there a way to print one?

Copy link

We found the following entries in the FAQ which you may find helpful:

Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review.

This is an automated reply, generated by FAQtory

@carbon-starlight
Copy link
Author

carbon-starlight commented Feb 22, 2024

Never mind, it looks like my VSCode terminal wasn't displaying the whole lines for some reason. There are line numbers when printing single strings at the end of the lines, the terminal just crops them sometimes.

Copy link

I hope we solved your problem.

If you like using Rich, you might also enjoy Textual

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

No branches or pull requests

1 participant