473,609 Members | 1,818 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Debugging Python ?

Hi'ya ppl,

I'd be happy to hear your techniques to debug python programs.
Is there any interactive debugging environment by any chance ?

thanks in advance,
B

Jul 18 '05 #1
2 1595
Hello Bill,
I'd be happy to hear your techniques to debug python programs.
Is there any interactive debugging environment by any chance ?

IDLE comes with a debugger.

Personally I use pdb. I have the following line in my .bashrc:
alias pdb='python /lib/python2.3/pdb.py'

And then just
pdb myprog.py -n -q 10034

I like pdb since it allows me to evaluate expression during debugging.

HTH.
Miki
Jul 18 '05 #2
"Bill Loren" <lo*****@bezeqi nt.net> writes:
Hi'ya ppl,

I'd be happy to hear your techniques to debug python programs.
Is there any interactive debugging environment by any chance ?


Using Emacs together with pdb makes a pretty good interactive
debugging enviroment for me. If you are running on windows there are
some hoops to jump through to make this work, mail me if you need
instructions.

Jul 18 '05 #3

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

Similar topics

5
1474
by: Humpty Dumpty | last post by:
Hello, I've been using python for about 3 months now. Prior to that I did C++ for over 5 years. I'm wondering if my debugging techniques are too C++ oriented. E.g., it took me about 9 hrs of debugging to figure out that the second parameter to weakref.ref() was being passed as None. This is odd because the second parameter is optional, yet its default value is not documented, so I assumed that passing None would be fine, and then I...
8
1785
by: beliavsky | last post by:
If I have some debugging code in a Python program (mostly print statements) and I want to turn it "off", two obvious methods are to (1) comment out the code (2) set a logical 'debug' variable at the beginning and use it to conditionally run the debugging code. Is there a better way? Some other languages have conditional compilation. (I don't know if that is better or worse). What is the "best" way to maintain "production" and...
4
2274
by: Jesper Olsen | last post by:
Hi, I have a C-extention build with distutils that I would like to debug. How can I specify to distuils to pass option "-g" and not "-O2" along to the compiler (gcc)? Jesper
0
2266
by: peter | last post by:
Hello all, I would like to debug my python libraries, written in c++, with GDB (gnu debugger) I'm using the mingw compiler in a windows environment. As development environment I use eclipse with the CDT plugin. This plugin also has a nice GUI frontend for the GDB. I've already tried several setups, no setup seemed to work.
1
3817
by: jim.eggleston | last post by:
I just figured out a reasonably decent way to use pdb in SciTE for debugging Python scripts. Debugging takes place in the SciTE output window. I have only tested this with SciTE on Windows. Here are the pieces you need: 1. Create a debug.py script file (I save this in c:\usr\python\scripts): import sys from pdb import pm, set_trace
4
1207
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 getting wrong values for the simulation results. Is there any debugging facilities in python which would let me go step by step and check the values of the variables at every step. I have done something like this in MS Visual Stdio 6.0 sometime back. For python, I am using SPE.
20
4189
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 that. I like SPE but couldn't easily use winPDP. I need tips to debug my code easily. Every help is greatly appreciated. Thanks
2
2131
by: Gary Wessle | last post by:
Hi python users I am using emacs and python-mode.el under dabian testing. is there a way to debug python code where I can step over each line and watch the value of all the variables and be able to change any during debugging. say you have a loop structure and want to see what the values of your variables are during debugging when your code is running as you step line by line. thanks
4
2083
by: dbee | last post by:
Right. I've got a really, really annoying/difficult/time consuming problem with my development environment. I'm using django to build a web app with paypal integration. My server is hosted remotely, and it is receiving IPN (payment notifications) POST requests from Paypal. I've checked on google and irc and this is my last shot at solving this before I go mad ... :-( The problem is that I can't debug those POST requests. Browser...
2
2403
by: Diez B. Roggisch | last post by:
Hi, I'm fiddling around with pydb. Installation and usage are fine. What I especially like is the fact that you can attach a signal such that you drop into debugging mode on demand. But this is of limited use to me in situations where a server is written in python. According to the source, pydb's debugger class Gdb extends cmd.Cmd. It passes stdin/stdout-arguments that should be usable to replace the
0
8083
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8573
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8547
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8224
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8406
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7013
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4091
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2535
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1676
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.