472,353 Members | 2,200 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

python debugger tips?

Hi All,

I'm switching to python from perl, and like the language a ton, but I
find pdb and pydb to be vastly inferior debuggers to the perl version.

In particular, I've grown very used to stepping into arbitrary
functions interactively. For instance, in perl you can do this:

casqa1:~perl -de 42

Loading DB routines from perl5db.pl version 1.28
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

main::(-e:1): 42
DB<1sub foo {return 42}

DB<2s foo()
main::((eval 7)[/usr/local/lib/perl5/5.8.6/perl5db.pl:628]:3):
3: foo();
DB<<3>s
main::foo((eval 6)[/usr/local/lib/perl5/5.8.6/perl5db.pl:628]:2):
2: sub foo {return 42};
DB<<3>>

Which is quite awesome; I don't have to restart the program if I want
to step through a given function call with a different set of values.

Does anyone have advice on any macros or something that i could use to
do this?

Additionally, what do people recommend as good "advanced" python
debugger guides? Explaining breakpoints and all is useful, but I
really want to know how to make sophisticated macros and interact with
the debugger from the interactive prompt.

Thanks!
Y
Oct 10 '08 #1
4 1294
take a look at winpdb (which has no relation with Windows-OS !!

cheers,
Stef
Oct 10 '08 #2
On Oct 10, 5:58 pm, Stef Mientki <stef.mien...@gmail.comwrote:
take a look at winpdb (which has no relation with Windows-OS !!

cheers,
Stef
Looks pretty cool; sadly, our sysadmin refuses to install wxwindows,
and the commandline version is fairly cryptic...

Thanks!
Y
Oct 10 '08 #3
Being a bit of an old fart, I much prefer to do my text editing on a dark
background. I find the paper-emulation paradigm an interesting idea but
lacking in ergonomic value.

With a bit of jiggering I was able to get the 2.5 version of IDLE to work
the way I want, namely a black background with text in various colours. I
can ALMOST do the same thing with the IDLE that comes with python 3 except
that the window background remains steadfastly white. So I see colour on
black for all the portions of the screen where text appears, but the blank
areas (end of line to right margin) are white.

Has anyone else encountered such a problem or am I the only one to even try
it?

Oct 13 '08 #4
Pat
ju**********************@gmail.com wrote:
Hi All,

I'm switching to python from perl, and like the language a ton, but I
find pdb and pydb to be vastly inferior debuggers to the perl version.

In particular, I've grown very used to stepping into arbitrary
functions interactively. For instance, in perl you can do this:
>
Does anyone have advice on any macros or something that i could use to
do this?

Additionally, what do people recommend as good "advanced" python
debugger guides? Explaining breakpoints and all is useful, but I
really want to know how to make sophisticated macros and interact with
the debugger from the interactive prompt.

Thanks!
Y
I'd strongly recommend you try Wing Pro IDE (Windows or *IX)

http://wingware.com/

Free 30 day trial (10 days at a time). You can download and fully use
the program (it's not crippled) without having to use a credit card.
$179/user/operating system.

Absolutely great for debugging code. You can take chunks of code and
put into the integrated Python shell (a Wing pane) and test it out.

As I'm writing code, I test out each line then blocks of code. While
running the program, the integrated Python shell recognizes your
variables and you can modify them on the fly.

I found Eclipse to be inscrutable for Python but I was able to
understand and use Wing within an hour or so. There's a free
showmedo.com video of the Wing IDE
(http://showmedo.com/videos/video?nam...ldWingIDEIntro)

Wing IDE Pro is missing some features that Eclipse has but I thought
that Wing was so much better than Eclipse that I paid for Wing Pro. The
license allowed me to put it on my home and work computers. I am in no
way affiliated with the company except that I'm a very satisfied customer.
Oct 16 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Glenn Reed | last post by:
This is just a general comment after trying my hand at some serious python programming for the first time. Have played with it for some time but...
25
by: Jeff | last post by:
Use the MS Script Editor included free with MS Office 2002 and above, for debugging Internet Explorer (IE). This subject is of great interest to...
8
by: mrelectron | last post by:
hi: Nir Aides who wrote the rpdb debugger has enhanced it and stuck a frontend on it whoo-hoo. it is fantastico! see and download it at...
8
by: chuck | last post by:
Apparently not too many people use or are interested in PythonWin. I'm giving up on it. It used to work pretty good. I'm lucky that I have...
4
by: diffuser78 | last post by:
I am a python newbie. I have writen some 500 lines of code. There are 4 classes and in all 5 files. Now, I am trying to run the program. I am...
20
by: krypto.wizard | last post by:
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...
14
by: sushant.sirsikar | last post by:
hi, I want to know which is the best IDE for python.Please if possible mention the features of the IDE. Thank You. Sushant
11
by: Bart Ogryczak | last post by:
Hi, Rigth now I'm using two IDEs for Python, KDevelop and Eric. Both have drawbacks. KDevelop is a multilanguage IDE, and doesn't really have...
5
by: Laszlo Nagy | last post by:
Hello, I was trying to get answers for these. SPE homepage was down. Then I found it on berlios...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.