pudb icon indicating copy to clipboard operation
pudb copied to clipboard

Display path of current source file in header bar

Open qhuy4119 opened this issue 4 years ago • 2 comments

Currently, the full path of the current source file will be displayed. This usually results in long path. When the path can't be displayed fully in 1 row for whatever reason (the window is resized, not enough space from the beginning,...), after a Ctrl-L (hotkey for redraw screen), it will wrap automatically, creating more rows as needed. Screenshot_20210713_195215

We have multiple options to resolve this:

  • Leave as is
  • Only display the filename
  • Calculate the length of the string somehow (from shutil.get_terminal_size(), for example)
  • Let user decide in config file
  • Other....

Let's discuss this

fixes #170

qhuy4119 avatar Jul 13 '21 12:07 qhuy4119

I updated it to calculate the path string automatically to fit on 1 line

Currently, path will be updated if the user executes the next line of code by pressing n, s, c in the Source window(every time DebuggerUI.interaction gets called). Ctrl-l to redraw will only redraw the current path. I don't know if it's possible for Ctrl-l to update the path as well.

qhuy4119 avatar Jul 15 '21 10:07 qhuy4119

A thought on this: an optional footer might be a better place. The header currently displays very useful information that helps new users get started with using the debugger, and I don't think we should lose that.

mvanderkamp avatar Aug 21 '21 23:08 mvanderkamp