Let's talk about debuggers!

Thomas Jollans tjol at tjol.eu
Wed Oct 25 17:21:46 EDT 2017


On 25/10/17 22:18, Terry Reedy wrote:
> On 10/25/2017 12:12 PM, Thomas Jollans wrote:
>> On 2017-10-25 15:57, Rustom Mody wrote:
>>>
>>> pdb inside emacs works (to a fashion)
>>> And it shows the arrow for current line so its at least quasi-gui
>>>
>>> I believe idle too is much more usable than a few years earlier
>>
>> I haven't used IDLE in years (if ever), partly because Tkinter is so
>> incredibly ugly, and feels so out-of-place on a modern PC (maybe it's
>> tolerable on Windows, I wouldn't know).
> 
> On Windows, it uses native widgets when possible, so the look and feel
> of IDLE's editor is the same as some other apps, such as Notepad++.  We
> are in the process of switching to the ttk widget set, which improve the
> look on Linux and even more so on Macs.  The settings dialog was redone,
> in part, for 3.6.3 and 3.7.  Which version are you using?

This was 3.6.0. The look is "meh", but the file selection dialog is (for
me) the real usability disaster.

> 
>> In any case I just tried it out and good lord that's terrible.
> 
> The debugger UI has not gotten its badly needed makeover yet; there is a
> issue and patch to do so.

Glad to hear it!

> 
>> You can
>> set breakpoints in the editor (good), it shows locals (excellent), but
>> it doesn't show you what line you're at when stepping through
>> (seriously?).
> 
> Seriously, you either did not look, or you have a broken IDLE
> installation, or you ran into a severe bug I would like to know about.
> Rather than never, the next line is shown 2 or 3 times.

Sorry Terry, of course you're right. What I meant to write was that it
doesn't *point* to the current line (in the editor) - as apparently
emacs does. I did notice it quoting the current line in the debugger window.

> 
> 1.The module, line number, and code of the next line is shown
> immediately below the header of buttons and checkboxes.
> 
> 2. The box below shows the complete stack of Python lines in the process
> of being run, including (again) the one that will be executed next.  For
> each, it shows the module, line number, and text of the line.
> 
> Bug: code and line number are reversed on the last line, which is the
> repeat of the next line.  Enhancement: make list more readable with
> module, number, and code in neat columns.  The window will have to be
> much wider, or each line split as in tracebacks, to do this.

This sounds like it'll make a nice improvement.

> 
> 3. If one checks the '[X] source' box at the top, the 'next' line is
> highlighted in an IDLE editor window.  This is currently not checked by
> default because the debugger would currently open *every* file stepped
> into.  When opening new windows is made optional, source will be checked
> by default.

Aha!

> 
> In summary, I think debugger should rate at least 'good' rather than
> 'fail' when it comes to showing you the next line.


> 
>> I'll go back to not even touching IDLE with a ten-foot pole now.
> 
> Do as you want, but please report accurately.  There are bugs around the
> debugger, but not, that I know of, the one you claim.

Guilty as charged.


Thomas





More information about the Python-list mailing list