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

should_use_colors inside debugger #497

Closed
euri10 opened this issue Nov 23, 2019 · 2 comments
Closed

should_use_colors inside debugger #497

euri10 opened this issue Nov 23, 2019 · 2 comments

Comments

@euri10
Copy link
Member

euri10 commented Nov 23, 2019

the colorized formatter in pycharm debugger doesnt work (it displays everything in black) because for the AccessFormatter we have

    def should_use_colors(self):
        return sys.stdout.isatty()

that returns False and same for the DefaultFormatter, where

    def should_use_colors(self):
        return sys.stderr.isatty()

that returns the same False

In that particular case, the process is ran with pydevd.
I'm not familar with its internals, but a quick look makes me think it redirects stderr/stdout
https://github.com/fabioz/PyDev.Debugger/search?q=isatty&type=Code

do you think the should_use_colors test could be improved or that I should raise an issue there ?

@tomchristie
Copy link
Member

do you think the should_use_colors test could be improved

I'm not aware that there's anything smarter we can do there?

What do we think about adding a --log-colors/--no-log-colors command line flag, that explicitly forces the colors on/off, rather than relying on auto-detection?

Any pull requests for that would be very welcome.

@tomchristie
Copy link
Member

Closed via #502

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

2 participants