[BangPypers] Best python source browsing tool for Mac + Emacs / Sublime
Noufal Ibrahim KV
noufal at nibrahim.net.in
Tue Dec 31 05:01:35 CET 2013
On Tue, Dec 31 2013, Sriram Karra wrote:
> On Mon, Dec 30, 2013 at 10:27 PM, Noufal Ibrahim KV
> <noufal at nibrahim.net.in>wrote:
>> With Python, I don't really use tag jumping. With my own code base, if
>> I'm tag jumping and moving around like that, I usually consider that an
>> issue with the way my app is laid out. With other peoples code, I
>> usually figure out where a message or some behaviour that I'm interested
>> in is happening and stick a pdb.set_trace() over there. I then run it
>> and use PDBTrack to trace things from there to understand what's
>> happening. I guess this is partly because with Python, most things are
>> at runtime and partly because it's easier to not reason about the
>> program and just to see it run. I'm not big on 'intelligent' completion.
>> With C, I do the tag jumping thing and use etags.
> Interesting; should try a debugger-first approach next time I am looking at
> a newly clone third party repo :)
> But I am not sure I understand why you could not do the same thing with GDB
> and breakpoints? Is there something python-specific I am not getting?
My reasons are probably more historical than evidence based. It's just
what I've been doing. In general though, this kind of static thing works
better with compiled languages than with Python (in my experience
anyway). I don't usually need to run stuff to figure out where things
are going wrong. That being said, I do stick printfs here and there.
More information about the BangPypers