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

IDLE Debugger: Improve GUI #62142

Open
terryjreedy opened this issue May 9, 2013 · 11 comments
Open

IDLE Debugger: Improve GUI #62142

terryjreedy opened this issue May 9, 2013 · 11 comments
Assignees
Labels
3.8 only security fixes 3.9 only security fixes 3.10 only security fixes topic-IDLE type-feature A feature request or enhancement

Comments

@terryjreedy
Copy link
Member

BPO 17942
Nosy @terryjreedy, @serwy, @roseman, @mlouielu
PRs
  • bpo-17942: Improve IDLE debugger user interface #2454
  • gh-62142: IDLE - rework debugger UI #22947
  • Files
  • debugpanel.py
  • debugger-ui.patch
  • 0001-WIP.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/terryjreedy'
    closed_at = None
    created_at = <Date 2013-05-09.05:20:18.494>
    labels = ['expert-IDLE', 'type-feature', '3.8', '3.9', '3.10']
    title = 'IDLE Debugger: Improve GUI'
    updated_at = <Date 2020-10-24.20:50:01.223>
    user = 'https://github.com/terryjreedy'

    bugs.python.org fields:

    activity = <Date 2020-10-24.20:50:01.223>
    actor = 'markroseman'
    assignee = 'terry.reedy'
    closed = False
    closed_date = None
    closer = None
    components = ['IDLE']
    creation = <Date 2013-05-09.05:20:18.494>
    creator = 'terry.reedy'
    dependencies = []
    files = ['40266', '40551', '46884']
    hgrepos = []
    issue_num = 17942
    keywords = ['patch']
    message_count = 11.0
    messages = ['188752', '225250', '225252', '249207', '251360', '294126', '294128', '294129', '294175', '305008', '379539']
    nosy_count = 4.0
    nosy_names = ['terry.reedy', 'roger.serwy', 'markroseman', 'louielu']
    pr_nums = ['2454', '22947']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue17942'
    versions = ['Python 3.8', 'Python 3.9', 'Python 3.10']

    @terryjreedy
    Copy link
    Member Author

    The IDLE debugger has subwindows to display name-object bindings for locals and (optionally) globals. They have a gray background. Text is black, object strings get a white background box. The issue is that the white box and text for each name is slightly raised relative to the name. This is somehow especially noticeable to me for something like 'd = 3', resulting in
    d3
    with 3 boxed and raised a bit so it almost looks like a superscript.

    This is a fairly minor issue, so low priority now unless trivially fixed. But it should be part of polishing IDLE. I am hoping that this is not a tk bug that is terrible to work around.

    @terryjreedy terryjreedy added topic-IDLE type-feature A feature request or enhancement labels May 9, 2013
    @terryjreedy
    Copy link
    Member Author

    With more debugger use experience, I decided that there are many possible small improvements that would make it easier to use for beginners.

    1. The window strikes me as overall 'blah', if not ugly. The difference between inactive and active could be brighter.

    2. There are 5 action buttons: They could be labelled as such, and maybe spaced out a big. They could all use an explanatory popup. [quit], for instance, means quit the current session *without* closing the window.

    3. There are 4 display checkboxes. They could be labelled as such on a line under the action buttons. The buttons could then be spread out a bit.

    4. In the middle of the gray field, I see, for instance,
      tem.py:1 <module>0 # or
      <pyshell#0>:1 <module>0 # if enter statement interactively
      'tem.py' is the file name, either 0 or 1 or both are line numbers (Python 0, tk 1). <module> seems redundant here as nothing else can be run, unless importing another module in an open window would

    5. The first line in the Stack box (not labelled, unlike Locals and Globals boxes), always has
      'bdb'.run(), line 431: exec(cmd, globals, locals)
      This seems like noise, better suppressed if possible. Next line:

    '__main__'.<module>0, line 1: pass

    1. If one only has [locals], globals == module-level locals is displayed in a 'locals' box. If one hits [globals], that box is relabeled 'globals' and an empty 'locals' box open above. Perhaps the initial box should be 'globals/locals' and relabeled to either when stepping into a class or function.

    @terryjreedy terryjreedy changed the title IDLE Debugger: names, values misaligned IDLE Debugger: Improve GUI Aug 13, 2014
    @terryjreedy
    Copy link
    Member Author

    1. The offset with my current screen is two pixels, as determined by ___='______' and not as bad as I remember it. Probably due to padding differences.

    2. The font and fontsize of Debug Control are fixed, as with dialogs.

    @roseman
    Copy link
    Mannequin

    roseman mannequin commented Aug 26, 2015

    Have attached debugpanel.py, implementing a ttk-based mockup of one possible redesign of the debugger UI, as seen in http://bugs.python.org/file40234/newtabs.png

    @roseman
    Copy link
    Mannequin

    roseman mannequin commented Sep 22, 2015

    Have attached debugger-ui.patch, which greatly updates the user interface for the existing debugger.

    This also relies on some images that should be downloaded and unpacked into the 'Icons' directory: http://www.tkdocs.com/images/debugicons.zip

    Summary of changes:

    • works with both Tk 8.4 and 8.5+
    • paned window separates left and right, allowing adjusting relative sizes
    • on left, toolbar with graphical/text buttons, plus message, and stack
    • on right, local and global variables of selected stack frame
    • running program can be interrupted via 'stop' button
    • stack and variables use listbox (8.4) or tree (with resizable columns)
    • removed locals, globals, and stack 'view' options
    • source option changed to auto-open windows to see source
    • can always view source by double-clicking or context menu in stack
    • full value of variable can be seen via tooltip in variable list

    In future, this will also replace the 'stack viewer' feature for displaying
    exceptions, but this has not yet been integrated.

    @mlouielu
    Copy link
    Mannequin

    mlouielu mannequin commented May 22, 2017

    Mark, do you mind to rebase your patch to the latest version?

    @mlouielu
    Copy link
    Mannequin

    mlouielu mannequin commented May 22, 2017

    Rebase markroseman patch to latest version, I own no credit on this patch.

    Just want to check the effect about the patch.

    @terryjreedy
    Copy link
    Member Author

    Mark, Python now uses git and pull requests. Can you, and do you wish to, rebase and convert to a pull request, any of your patches we wish to investigate further, yourself, or should we go ahead and do so? Silence for a week will be taken as the latter. The main difference is being the author of the pull request, versus 'merely' being credited in the commit message, as before.

    @roseman
    Copy link
    Mannequin

    roseman mannequin commented May 22, 2017

    Please go ahead with any of the patches I submitted earlier, credit is absolutely not an issue.

    @terryjreedy terryjreedy added the 3.7 (EOL) end of life label May 26, 2017
    @terryjreedy terryjreedy self-assigned this May 26, 2017
    @terryjreedy
    Copy link
    Member Author

    IDLE now uses ttk unconditionally by requiring tk 8.5. The patch can therefore be simplified accordingly.

    @roseman
    Copy link
    Mannequin

    roseman mannequin commented Oct 24, 2020

    have updated/cleaned up the previous patch, and there's a new PR. i realize this is unfortunately a somewhat monolithic change which might make reviewing it a bit tough...

    @roseman roseman mannequin added 3.8 only security fixes 3.9 only security fixes 3.10 only security fixes and removed 3.7 (EOL) end of life labels Oct 24, 2020
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 only security fixes 3.9 only security fixes 3.10 only security fixes topic-IDLE type-feature A feature request or enhancement
    Projects
    Status: In Progress
    Development

    No branches or pull requests

    1 participant