classification
Title: IDLE Debugger: Improve GUI
Type: enhancement Stage: patch review
Components: IDLE Versions: Python 3.7, Python 3.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: louielu, markroseman, roger.serwy, terry.reedy
Priority: normal Keywords: patch

Created on 2013-05-09 05:20 by terry.reedy, last changed 2017-10-25 20:12 by terry.reedy.

Files
File name Uploaded Description Edit
debugpanel.py markroseman, 2015-08-26 15:56
debugger-ui.patch markroseman, 2015-09-22 23:34 review
0001-WIP.patch louielu, 2017-05-22 08:11 review
Pull Requests
URL Status Linked Edit
PR 2454 open markroseman, 2017-06-27 22:57
Messages (10)
msg188752 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2013-05-09 05:20
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.
msg225250 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2014-08-13 00:39
With more debugger use experience, I decided that there are many possible small improvements that would make it easier to use for beginners.

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

1. 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.

2. 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.

3. 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 

4. 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

5. 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.
msg225252 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2014-08-13 00:52
6. 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.

7. The font and fontsize of Debug Control are fixed, as with dialogs.
msg249207 - (view) Author: Mark Roseman (markroseman) * Date: 2015-08-26 15:56
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
msg251360 - (view) Author: Mark Roseman (markroseman) * Date: 2015-09-22 23:34
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.
msg294126 - (view) Author: Louie Lu (louielu) * Date: 2017-05-22 07:45
Mark, do you mind to rebase your patch to the latest version?
msg294128 - (view) Author: Louie Lu (louielu) * Date: 2017-05-22 08:11
Rebase markroseman patch to latest version, I own no credit on this patch.

Just want to check the effect about the patch.
msg294129 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-05-22 08:13
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.
msg294175 - (view) Author: Mark Roseman (markroseman) * Date: 2017-05-22 19:54
Please go ahead with any of the patches I submitted earlier, credit is absolutely not an issue.
msg305008 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-10-25 20:12
IDLE now uses ttk unconditionally by requiring tk 8.5.  The patch can therefore be simplified accordingly.
History
Date User Action Args
2017-10-25 20:12:23terry.reedysetmessages: + msg305008
2017-06-27 22:57:07markrosemansetpull_requests: + pull_request2510
2017-05-26 05:32:55terry.reedysetassignee: terry.reedy
stage: needs patch -> patch review
versions: + Python 3.6, Python 3.7, - Python 2.7, Python 3.4, Python 3.5
2017-05-22 19:54:43markrosemansetmessages: + msg294175
2017-05-22 08:13:18terry.reedysetmessages: + msg294129
2017-05-22 08:11:26louielusetfiles: + 0001-WIP.patch

messages: + msg294128
2017-05-22 07:45:31louielusetnosy: + louielu
messages: + msg294126
2015-09-22 23:34:15markrosemansetfiles: + debugger-ui.patch
keywords: + patch
messages: + msg251360
2015-08-26 15:56:10markrosemansetfiles: + debugpanel.py

messages: + msg249207
2015-08-06 15:42:08markrosemansetnosy: + markroseman
2014-10-20 04:59:27terry.reedylinkissue13504 dependencies
2014-08-13 00:52:49terry.reedysetmessages: + msg225252
2014-08-13 00:39:51terry.reedysetmessages: + msg225250
title: IDLE Debugger: names, values misaligned -> IDLE Debugger: Improve GUI
2014-07-27 22:45:50terry.reedysetversions: + Python 3.5, - Python 3.3
2013-05-09 05:20:18terry.reedycreate