> -----Original Message----- > From: Grant Edwards <grant.b.edwa...@gmail.com> > Sent: Monday, May 31, 2021 11:17 AM > To: python-list@python.org > Subject: Re: How to debug python + curses? [was: RE: Applying winpdb_reborn] > > On 2021-05-30, Alan Gauld via Python-list <python-list@python.org> wrote: > > On 30/05/2021 18:26, pjfarl...@earthlink.net wrote: > >> I tried winpdb-reborn some time last year on my Win10 system (python > >> 3.8.3 at that time), but could not figure out how to use it to debug > >> a python script that uses the curses module. > > > > You are not alone. debugging curses is one of the biggest obstacles to > > its use. > > Can't you just run the debugger in a different window and attach to the process > you want to debug? That's how one uses a debugger with curses apps written in > C/C++. Or I add debugging printf calls which write to stderr and redirect stderr to > a file.
"Attach to another (console) process you want to debug" isn't, AFAIK, a command-line capability from a Windows command prompt as it is in *ix terminal windows. > > My approach is to define a status line at the bottom of my program and > > write print statements into that window. Something like: > > Why not just use the standard python logging facility and log to a file or another > terminal window? As I said in an earlier reply, I have done that, and it works, but it is somewhat slower and certainly not interactive. Peter -- https://mail.python.org/mailman/listinfo/python-list