inducer / pudb

Full-screen console debugger for Python
https://documen.tician.de/pudb/
Other
3k stars 230 forks source link

Alignment problem using Linux Screen #393

Closed fxyu closed 4 years ago

fxyu commented 4 years ago

I'm new to pudb and I really like the interface. I am currently trying to use pudb under Linux screen and the alignment is not what I expected.

pudb_bug

There is no issue when I use it without using Linux screen and I also found that it is terminal specific. I have no issue when using "cmder" in Windows10 but this problem occur when I use "Hyper" and "Terminus" under Linux screen.

inducer commented 4 years ago

Just tried on Debian testing with screen 4.8.0 on kitty 0.18.1 and gnome-terminal 3.36.2 (libvte 0.60.3). I'm not able to reproduce the issue.

What do you observe the environment variable $TERM to be set to inside screen? What version do you use? Does the issue occur when using tmux (I use that nearly daily with pudb and have never had an issue.)

asmeurer commented 4 years ago

Looks like it's probably an urwid problem. What version of urwid do you have?

fxyu commented 4 years ago

Just tried on Debian testing with screen 4.8.0 on kitty 0.18.1 and gnome-terminal 3.36.2 (libvte 0.60.3). I'm not able to reproduce the issue.

What do you observe the environment variable $TERM to be set to inside screen? What version do you use? Does the issue occur when using tmux (I use that nearly daily with pudb and have never had an issue.)

without using the screen echo $TERM returns screen-256color when inside a screen echo $TERM returns screen

The version of the screen is version 4.03.01 (GNU) 28-Jun-15 I will try to install tmux to test this issue.

Looks like it's probably an urwid problem. What version of urwid do you have?

my urwid version is 2.1.0

inducer commented 4 years ago

What happens when you run one of the urwid sample apps?

fxyu commented 4 years ago

Some similar problem occur when I ran urwid sample apps.

image

inducer commented 4 years ago

Hmm... that points to a problem that should be addressed by fixing Urwid then. It's not likely that pudb can do much about that. Have you tried switching to the curses display driver in pudb?

fxyu commented 4 years ago

I use WSL in windows as the shell and it fixed the problem. Which $TERM is prefer for using pudb?

inducer commented 4 years ago

It's not really a choice. $TERM should match your terminfo database and the terminal you're using. Some examples that work on my system: xterm, xterm-kitty, screen.

asmeurer commented 4 years ago

Did you fix the problem by modifying your $TERM environment variable or by changing the display driver in the pudb settings?

fxyu commented 4 years ago

I've moved to use tmux as my screen multiplexer, and I fixed my $TERM env variable to screen-256color in the tmux's profile. It solved the problem.

Tested shell :

Terminal: