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

No code snippet highliting (ipdb does it) #38

Open
ssbarnea opened this issue Aug 24, 2022 · 6 comments
Open

No code snippet highliting (ipdb does it) #38

ssbarnea opened this issue Aug 24, 2022 · 6 comments

Comments

@ssbarnea
Copy link
Contributor

As seen in screenshot below, the code snippets are not colored in any way, I would have expected at least the filename to be colored. At the same time ipdb does it.

I know that pdbr prints better variables, but if the cost of doing this means losing the trace highlighting, I kinda doubt people will still to it.

@cansarigol
Copy link
Owner

I am also using pdbr with pytest on my projects and I couldn't see this result. Do you know how I can reproduce it on my local?

@ssbarnea
Copy link
Contributor Author

I need to play a little bit more because I seen it working sometimes and not working in other cases. I am not sure yet what/when why.

Btw, do you have some code that looks for NO_COLOR because I know that I disable colors on one project inside conftest.py -- maybe this is affecting the debugger.

@cansarigol
Copy link
Owner

I see, unlike pdbr, ipython is not sensitive to NO_COLOR.

@michprev
Copy link

I think I am experiencing the same issue when walking up and down a stack trace. It seems this issue is reproducible with the same content (lines of code). Line numbers and module paths do not matter. Using pdbr 0.7.7.

I have created a minimal example: https://gist.github.com/michprev/4ace9121079f21cb8d9267f78481cff2

First project:
image

Second project:
image

@cansarigol
Copy link
Owner

@michprev Thanks for the example. The problem that you are having looks a bit different. 0.7.7 causes it. I want to change print_stack_entry print with rich. Syntax instead of directly console print. I've applied this change to v0.7.8.

@michprev
Copy link

michprev commented Feb 1, 2023

@cansarigol Yes, it solved my issue. Thank you!

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

3 participants