Skip to content

Conversation

@roseman
Copy link
Contributor

@roseman roseman commented Oct 24, 2020

  • updated to use ttk widgets throughout
  • simplified controls, changed go/step/etc. to image buttons
  • overall layout is a two-pane horizontal window (controls, stack, status on left, variables on right)
  • treeview widget used to replace custom scrolled-listbox stackviewer and custom canvas-based namespaceviewer
  • integrated locals/globals into a single treeview on right; can collapse/expand each independently instead of having checkboxes to control whether shown or not
  • removed scrolledlist.py (was previously used only by stackview)

@E-Paine
Copy link
Contributor

E-Paine commented Oct 25, 2020

Is it possible to do without using preset image sizes and font? (if for some reason the default font is larger than normal, the difference is very obvious). Even if we cannot change the image and font sizes dynamically, I think we should avoid fixing the family.

- updated to use ttk widgets throughout
- simplified controls, changed go/step/etc. to image buttons
- overall layout is a two-pane horizontal window (controls, stack, status on left, variables on right)
- treeview widget used to replace custom scrolled-listbox stackviewer and custom canvas-based namespaceviewer
- integrated locals/globals into a single treeview on right; can collapse/expand each independently instead of having checkboxes to control whether shown or not
was being used by stack trace in debugger
- button captions now use TkIconFont (a bit bigger than before)
- status line now uses default font, plus derives italic variation for errors
@roseman roseman marked this pull request as draft October 25, 2020 18:15
@roseman roseman force-pushed the debugger-new-ui-17942 branch from 06a7185 to a8b8da4 Compare October 25, 2020 18:26
@roseman
Copy link
Contributor Author

roseman commented Oct 25, 2020

Oops, sorry about the committed merge (can you tell I'm not using git every day)? In any case, I've changed the hard-coded fonts as per Elisha's comment.

@roseman roseman marked this pull request as ready for review October 25, 2020 18:33
@methane methane removed their request for review October 26, 2020 06:54
@markshannon markshannon removed their request for review October 27, 2020 18:58
Copy link
Contributor

@E-Paine E-Paine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Massive visual improvement over the original! We have a few methods which don't do anything (add_varheader, mouse_moved_vars and leave_vars): I assume there's a plan for them but for now should we add a TODO to them?

Copy link
Member

@terryjreedy terryjreedy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only reviewed the comments, not the whole patch.

I verified that scrolled list is only used here and can go if not used here.
What is the replacement?

func = match.group(1) + '.' + func
else:
func = selfval.__class__.__name__ + '.' + func
except Exception:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I strongly prefer that we not add more bare exceptions. Certainly not without a justification comment.

# we've probably got the string representation of the
# object sent from the remote debugger, see if we can
# parse it into something useful
match = re.match('^<(?:.*)\.([^\.]*) object at 0x[0-9a-f]+>$',
Copy link
Member

@terryjreedy terryjreedy Nov 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Special chars are normal inside [] without \, so I think [^\.] and [^.] have the same effect (I prefer the latter) so that [^\\.] is needed to match 3 all 3 chars. Prefix r suppress strings escapes, but there are none, so I think it has no effect, though some prefer to use it for all REs. Outside the brackets, '\.' matches literal period, which is what want, whereas '\\.' matches multiple backslashes? I am not sure why later periods are excluded. CPython now prints addresses with A-F.

In any case, non-trivial REs should be defined at the top of the file so that they can be tested.

# we've probably got the string representation of the
# object sent from the remote debugger, see if we can
# parse it into something useful
match = re.match('^<(?:.*)\.([^\.]*) object at 0x[0-9a-f]+>$',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect this is correct. See previous comment about testing REs

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@terryjreedy
Copy link
Member

All REs with '' should be prefixed with 'r' because uses like . and \d not recognized by standard string processing are deprecated and will become errors in the future.

@roseman
Copy link
Contributor Author

roseman commented Nov 4, 2020

cleaned up the code and documentation in add_stackframee... not a shock but it was actually not doing anything as is because the 're' module hadn't been imported, which the bare exception oh-so-helpfully hid.. 😬

@E-Paine
Copy link
Contributor

E-Paine commented Nov 4, 2020

Just a general thing, is there a way to make the panedwindow more obvious? (when I first looked at the new design, I mistook it for padding until I looked at the code)

Copy link
Member

@terryjreedy terryjreedy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow PEP-8 in comments and my comment on clarifying debugger separation.

The IDLE Doc says of debugger "This feature is still incomplete and somewhat experimental. " Would you consider this still true after this patch?

@E-Paine
Copy link
Contributor

E-Paine commented Nov 4, 2020

Ubuntu failure related to issue 42142 (I have noted this there)

@terryjreedy
Copy link
Member

@E-Paine Thank you. GH will not let me download the failure log.

@E-Paine
Copy link
Contributor

E-Paine commented Nov 17, 2020

  1. I believe all review comments have been addressed except for the lazy/greedy regex one

  2. Does anyone have a high-dpi monitor to test this patch on? (I am concerned that the images will be too small so very hard to see on such a monitor)

@roseman
Copy link
Contributor Author

roseman commented Dec 6, 2020

related to issue #14111... i note that the 'stop' button in the in-progress debugger ui is actually doing 'quit' (and doesn't in fact work when in the middle of a busy loop).

i think it would make sense to add a 'pause' button beside go, which can be used to pause the running program, allowing it to be continued. i'm wondering if the stop button should be renamed or icon changed to make it more clear that it will terminate the running program altogether.

should probably add tool tips on the debugger controls as well

@github-actions
Copy link

github-actions bot commented Jan 6, 2021

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Jan 6, 2021
@rhettinger rhettinger removed their request for review May 3, 2022 06:15
@github-actions github-actions bot removed the stale Stale PR or inactive for long period of time. label Jul 30, 2022
@terryjreedy terryjreedy self-assigned this Nov 2, 2022
@terryjreedy terryjreedy changed the title bpo-17942: major rework of debugger UI gh-62142: IDLE - major rework of debugger UI Nov 2, 2022
@terryjreedy terryjreedy changed the title gh-62142: IDLE - major rework of debugger UI gh-62142: IDLE - rework debugger UI Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants