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

Dan Stromberg drsalists at gmail.com
Tue Jan 26 23:17:30 EST 2021


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.


More information about the Python-list mailing list