This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients Al.Sweigart, loewis, roger.serwy, terry.reedy
Date 2016-07-25.19:40:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1469475657.48.0.549293024764.issue15335@psf.upfronthosting.co.za>
In-reply-to
Content
In #27615, which I will close as a duplicate of this, Al Sweigart wrote

"Currently if the user "steps into" a print(), input(), sys.stdout.write() or other stdio-related call with the Source checkbox checked, it brings up PyShell.py.

This is often confusing for beginner programmers (the target audience of IDLE) and most often not helpful for experienced developers who are stepping through their program. Comparing the cost/benefit, I'd be much more helpful for IDLE to not bring up PyShell.py and instead just treat every "step into" of a print()/input()/anything-that-goes-to-pyshell as a "step over" instead."

I have changed my opinion from what I wrote a couple of years ago and now agree.  Print and input are different from stdlib functions, such as, "import asyncio; loop = asyncio.get_event_loop", in that they are used by nearly all beginners, are not imported, and are normally C-coded builtins that cannot be stepped into.  If one debugs an import- free program, it is startling to be dropped into foreign code.

IDLE should execute and debug user code as transparently as possible.  I now think that the debugger should not step into any idlelib file unless this is explicitly requested in a separate check box ('for IDLE maintainers'.  I suspect a blanket no-idlelib or yes-idlelib policy will be faster than the current code, and would avoid the current bug of not stepping into user code.

I recently moved the Pseudofile definitions from pyshell to run so that run does not need to import pyshell.  I did not consider whether or how this would affect debugging and should not have to. I plan other refactorings and movements between files.

Whether to worry about stepping in <frozen importlib._bootstrap> is a different issue, and one not specific to IDLE.
History
Date User Action Args
2016-07-25 19:40:57terry.reedysetrecipients: + terry.reedy, loewis, roger.serwy, Al.Sweigart
2016-07-25 19:40:57terry.reedysetmessageid: <1469475657.48.0.549293024764.issue15335@psf.upfronthosting.co.za>
2016-07-25 19:40:57terry.reedylinkissue15335 messages
2016-07-25 19:40:57terry.reedycreate