Let's talk about debuggers!
m
mvoicem at gmail.com
Wed Oct 25 16:31:16 EDT 2017
W dniu 25.10.2017 o 15:53, Ned Batchelder pisze:
> On 10/25/17 9:07 AM, Thomas Jollans wrote:
>> Hi,
>>
>> I just wanted to know what tools everyone used for debugging Python
>> applications - scripts / backend / desktop apps / notebooks / whatever.
>> Apart from the usual dance with log files and strategically inserted
>> print() calls, that is.
>>
>> Of course we all know and mildly dislike pdb.
>>
>> Personally, in practice, I'm most likely to need a debugger when
>> prototyping a function in a Jupyter notebook. There, ipdb, summoned with
>> the %%debug magic incantation, does the trick.
>>
>> Sometimes, though, I miss having a visual debugger. You know, the kind
>> that Visual Basic has had for decades. There's one in Chrome dev tools
>> if you ever have the misfortune of writing JavaScript.
>>
>> What options are there for Python (that work)? What text editors (and
>> IDEs) have a decent integrated debugger or debugging plugin? (Is there
>> anything for Sublime?) Does anyone use them? (How do YOU debug?)
>>
>> I vaguely remember WinPDB, but that hasn't seen a release in more than
>> seven years...
>>
>>
>
> pudb is a visual terminal debugger: https://pypi.python.org/pypi/pudb
>
> It uses the same commands as pdb, so it's easy to get started, but it
> gives you a variables pane, with customizable presentation, and so on.
>
> One of my favorite features: you can add a set_trace line in your
> program, and then if during the debugging session you realize you don't
> want to stop there every time, you can disable that breakpoint even
> though it's an explicit line of code telling the debugger to stop.
+1
It's excellent piece of software. I started using it when debugging
remote/server things, and ended with using eveywhere.
It has two drawbacks: it doesn't remember your commandline, watches and
sizes of panes, and has ugly default colour scheme.
Few years ago, I used Eclipse+PyDev, but I was tired with recurring
strange problems with Eclipse, which eg hanged until I reinstalled
eclipse or removed workspace metadata.
r. m.
More information about the Python-list
mailing list