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

C W tmrsg11 at gmail.com
Wed Jan 27 17:41:52 EST 2021


Great tutorial Irv, very simple with if-else example, gets the point
across.

My main takeaway from the discussion so far is that: you can't troubleshoot
Python without some kind of breakpoint or debugger.

I suppose I can't take the functional programming debugger style like C,
Matlab, or R, and apply it to a OOP language like Python.

On Wed, Jan 27, 2021 at 5:26 PM Irv Kalb <Irv at furrypants.com> wrote:

> On Jan 26, 2021, at 5:28 PM, William Ray Wing via Python-list <
> python-list at python.org> wrote:
> >
> >
> >
> >> On Jan 26, 2021, at 2:00 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?
> >>
> >
> > Another approach is to run the code in an IDE.  I happen to use Wing,
> but that is a coincidence.  But almost ANY IDE will let you set a break
> point, then single-step through your code starting at the break point and
> examine the values of your variables at each step.  Sometimes this is an
> awfully big hammer for what is a head-slapping mistake.  But it has never
> failed me.
> >
> >
>
> I'm happy with the PyCharm IDE.  I created a video showing how to use the
> debugger in that environment.  It's available on YouTube here:
>
> https://www.youtube.com/watch?v=cxAOSQQwDJ4 <mailto:python-list at python.org
> >
>
> Irv
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>


More information about the Python-list mailing list