Terry J. Reedy added the comment:

I just realized that there is a slight but in the patch so far.  When a 
non-empty program runs, it necessarily executes at least one statement in the 
main module.  It will only execute anything else when there is a call. 
Therefore, the stack trace always begins in the main module and that line can 
be used to display globals, making the globals item under functions redundant.

However, if there is a call to a function in another module, there need not be 
a module level statement.  By removing the globals items for functions in other 
modules, the current patch as is will not allow viewing of globals in other 
modules. A possible solution is to add an expandable module item every time the 
module changes.

Mark and I would like to combine the StackViewer and Debugger UIs.  
Essentially, a revised stackviewer pane would eventually become part of the 
debugger.  The Debugger avoids the intermediate +locals and +globals items of 
StackViewer by expanding both when an item is clicked.  However, the expansion 
is not added to the tree, but to the one locals box and the one (optional) 
globals box, both separate from and below the tree.

An alternate solution to the globals problem is to expand locals under a 
function when clicked on, as currently done with stackviewer, and expand 
globals to a globals box below the tree, as currently done with stackviewer.  I 
do not see much need to see the globals of different functions simultaneously 
(one can switch, as one must do not with Debugger).  I see more reason to see 
multiple locals of at the same time, and it also make sense to put locals right 
under each function.

Debugger already does item 8.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24790>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to