How do you debug in Python? Coming from a Matlab and R user. I'm already aware of pdb.

Antoon Pardon antoon.pardon at vub.be
Thu Jan 28 02:50:14 EST 2021



Op 27/01/21 om 05:17 schreef Dan Stromberg:
> On Tue, Jan 26, 2021 at 8:13 PM Dan Stromberg <drsalists at gmail.com> wrote:
>
>> On Tue, Jan 26, 2021 at 4:01 PM C W <tmrsg11 at gmail.com> wrote:
>>
>>> Hello everyone,
>>>
>>> I'm a long time Matlab and R user working on data science. How do you
>>> troubleshooting/debugging in Python?
>>>
>> I frequently read tracebacks and think about what's up in the code.
>>
>> I also often add print functions or logging - empiricism often beats
>> theorizing when the problems are weird.
>>
>> And once in a while I will use pudb - it's probably a pretty good fit for
>> a vim user like me, both being curses-based.  pdb is sad.  There are other
>> debuggers for Python:
>> https://wiki.python.org/moin/PythonDebuggingTools
>>
> BTW, there's a new tool I haven't tried yet, that sounds pretty
> interesting, especially for newcomers: It's called "friendly traceback" and
> can be found at https://pypi.org/project/friendly-traceback/
>
> Oh, and of course google search is a terrific tool for deciphering error
> messages.
I had a look at that and I think I still would prefer this recipe:
https://code.activestate.com/recipes/52215-get-more-information-from-tracebacks/



More information about the Python-list mailing list