Python Debugger / IDE ??

K

krypto.wizard

Is there any editor or IDE in Python (either Windows or Linux) which
has very good debugging facilites like MS VisualStudio has or something
like that.

I like SPE but couldn't easily use winPDP. I need tips to debug my code
easily.

Every help is greatly appreciated.

Thanks
 
O

olsongt

Is there any editor or IDE in Python (either Windows or Linux) which
has very good debugging facilites like MS VisualStudio has or something
like that.

I like SPE but couldn't easily use winPDP. I need tips to debug my code
easily.

Every help is greatly appreciated.

Thanks

I've always been happy with the debugger in PythonWin. You can even
use:

from pywin.debugger import set_trace;set_trace()

to bring up the debugger directly from a script that wasn't originally
run in the ide.
 
D

danmcleran

Is there any editor or IDE in Python (either Windows or Linux) which
has very good debugging facilites like MS VisualStudio has or something
like that.

I've been using Eclipse with PyDev and am very happy with it.
 
S

Scott David Daniels

Is there any editor or IDE in Python (either Windows or Linux) which
has very good debugging facilites like MS VisualStudio has or something
like that.

I like SPE but couldn't easily use winPDP. I need tips to debug my code
easily.

Every help is greatly appreciated.

Thanks
If you don't mind spending (not so much) money, ActiveState's Komodo
is a nice debugger. With it you can even debug a Python program on
a remote machine over a network connection (ideal for GUI problems).

--Scott David Daniels
(e-mail address removed)
 
B

bruno at modulix

Is there any editor or IDE in Python (either Windows or Linux) which
has very good debugging facilites like MS VisualStudio has or something
like that.

I like SPE but couldn't easily use winPDP. I need tips to debug my code
easily.

pythonic "debugging" in three steps:

1/ unit tests
2/ a bunch of print statements
3/ the interactive python shell

All this relying on well-decoupled, modular code.

FWIW, I've almost never used a debugger with Python.

HTH
 
K

krypto.wizard

My code has got big and it is an iterative program. I use print
statements but I thought I could get something handy it would be useful
to me.

thanks
 
L

Larry Bates

Is there any editor or IDE in Python (either Windows or Linux) which
has very good debugging facilites like MS VisualStudio has or something
like that.

I like SPE but couldn't easily use winPDP. I need tips to debug my code
easily.

Every help is greatly appreciated.

Thanks
I've found that using logging works well for me. I put statements in
my program that log information, trace, intermediate results, ..., and
wrap them in trace/debug if statements. Higher values of debug get more
"stuff" logged. Then I leave everything in the program. When something
goes wrong, run it with debug level and I can figure out what is
happening. This is especially good when problem pops up 2 years from
now. I just have client run with debug=4 and I look at the logfile. If
you get in a habit of writing ALL your software this way, you find that
it is quite powerful and easy. I haven't found the overhead of all the
if statements to be anything to worry about. You can use the standard
library logging module (I wrote my own before it was available and I've
never changed to the one in the standard library).

-Larry Bates
 
F

Felipe Almeida Lessa

Em Ter, 2006-03-14 às 09:44 -0800, (e-mail address removed) escreveu:
I've been using Eclipse with PyDev and am very happy with it.

I second that. It's the best Python IDE I've ever used. But you won't
get too far with less than 512 MiB of RAM...

--
"Quem excele em empregar a força militar subjulga os exércitos dos
outros povos sem travar batalha, toma cidades fortificadas dos outros
povos sem as atacar e destrói os estados dos outros povos sem lutas
prolongadas. Deve lutar sob o Céu com o propósito primordial da
'preservação'. Desse modo suas armas não se embotarão, e os ganhos
poderão ser preservados. Essa é a estratégia para planejar ofensivas."

-- Sun Tzu, em "A arte da guerra"
 
J

jean-michel bain-cornu

I've always been happy with the debugger in PythonWin. You can even
use:

from pywin.debugger import set_trace;set_trace()

to bring up the debugger directly from a script that wasn't originally
run in the ide.
I use that one also.
There is also Boa (http://boa-constructor.sourceforge.net/), available
both in Linux and Windows, and with the avantage of having a separate
process for the debugging unit, which is great when you have to explore
some unsane scripts.
Regards
jm
 
C

Christoph Zwerschke

Is there any editor or IDE in Python (either Windows or Linux) which
has very good debugging facilites like MS VisualStudio has or something
like that.

I like SPE but couldn't easily use winPDP. I need tips to debug my code
easily.

You can try out PyScripter, a relatively new Python IDE that is
completely free and has nice debugging and unit testing facilities.

The latest version is available here:
http://mmm-experts.com/Downloads.aspx?ProductID=4&ShowVersionInfo=yes

-- Christoph
 
C

Christoph Zwerschke

I like the Pyscripter, is there any Linux version or something of it.

Sorry, I forgot to mention that there is a snag in it. Since PyScripter
is based on Python for Delphi, it is available for Windows only.

-- Christoph
 
B

Bruno Desthuilliers

(e-mail address removed) a écrit :
My code has got big

How big ? More than 50 kloc ?-)

Big project doesn't imply long functions nor fat classes.
and it is an iterative program.

Sorry, I don't understand what you mean by "iterative" here.
 
R

Ritesh Raj Sarraf

Can you please point some good documents (need not be Python specific)
on best practices with writing code this way ?

Thanks,
Ritesh
 
D

Don Taylor

Christoph said:
Sorry, I forgot to mention that there is a snag in it. Since PyScripter
is based on Python for Delphi, it is available for Windows only.

Is there a free or low-cost version of Delphi for Windows available
anywhere?

Pyscripter looks interesting but when I went to the Borland site to find
out about the cost of Delphi I went into catatonic shock. They can't be
serious.

Then I read on Wikipedia that "On February 8th, 2006, Borland announced
that it was looking for a buyer for its IDE and Database line of
products, which included Delphi, to concentrate on its Application
Lifecycle Management line."

So I guess it is at the end of its life, at least with Borland. Maybe
they will FOSS it? Nah...

Don.
 
R

Rowdy

Don said:
Is there a free or low-cost version of Delphi for Windows available
anywhere?
<snip>

There used to be a Delphi 6 Personal Edition that was available free
(for non-commercial use). You might still find it around somewhere.

Rowdy
 
R

robert

bruno said:
pythonic "debugging" in three steps:

1/ unit tests
2/ a bunch of print statements
3/ the interactive python shell

All this relying on well-decoupled, modular code.

FWIW, I've almost never used a debugger with Python.

Thats a good socket for Python.
Arduos step-in debugging, big tedious remote debugging sessions etc. are
not really Pythonic. For complex things like GUI's and application
servers its a weak practice.

logs, postmortem debugging and ad-hoc debugging are the things to go next.

so its good when you can do .pm() .set_trace() to call the debugger
from the nature of your program. (And not: "The the debugger now calls
the app, once my level of anger raised beyond a certain limit").

For example with callable debuggers like pdb and also Pythonwin
(Pythonwin debugger "pywin.debugger.pm()" e.g. can be raised as simple
from normal apps / shell ) I simply do this in apps regularly:

if debug: sys.excepthook = excepthook_my_debugger

As soon as stuff crashes down (even in GUI message handlers) during all
of the development cycle: you have your fingers and cursor automatically
& immediatly at the stack context. That does >99% of usual python code
cooking. The rest is maybe for a (slow) breakpoint "b"

Unfortunately such method is not encouraged and exposed (clearly) in the
big IDE's. Those' overall style is a lazy copy of C, Java "I do"-hacker
history. Im curious much about their value at all. Keep it simple and
let Python do.

Robert
 
C

Christoph Zwerschke

Don said:
Is there a free or low-cost version of Delphi for Windows available
anywhere?

I don't know (never used Delphi actually). Anyway, you don't need to
have Delphi to use PyScripter, and PyScripter is completely free.
However, it will only run on Windows because it is developed with
Delphi. The advantage is that it is noticeably faster than most other
free Python IDEs written in Python.

-- Christoph
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top