-
-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pdb can only step when at botframe (PR#4) #32752
Comments
Jitterbug-Id: 4 [Resubmitted by GvR] It is a problem that bugged me for _ages_. Since the years I first wrote The problem is simply: when the frame being debugged is self.botframe, it It is less of a problem with pdb, but makes a GUI debugger clunky - if you The simplest way to demonstrate the problem is to create a module, and add My solution was this: instead of run() calling "exec" directly, it calls The end result is that "self.botframe" becomes an "intermediate" frame, and Im not yet trying to propose a patch, just to discuss this and see if the Thanks, Mark. ==================================================================== |
My common workaround is to always create a function called debug(): that calls the function in the module I am debugging. Instead of doing a runcall for my function I do a runcall on debug. |
Sorry I forgot to sigh the comment for 2000-Oct-17 07:18 |
Logged In: YES Is this really a bug? Or just a feature request? Perhaps |
Logged In: YES Yes, it's really a bug -- it's an annoyance, you have to hit |
Logged In: YES There appears to be a simple solution. Idea: Allow botframe not to be a frame at all, but also None. By this trick, botframe is llowed to be one level "on top" -- chris |
Logged In: YES You know, I cannot reproduce the problem! I created this module: import pdb
def foo():
x = 12
y = 2
z = x**y
print z
return
pdb.set_trace()
print 12
print "hello world"
foo() When I run it I get the pdb prompt. Before we start messing with this |
Logged In: YES This appears to have been fixed magically in Python 2.2. A scan of the pdb and bdb logs don't show an obvious |
Logged In: YES OK, closing. Christian: please *don't* check it it! |
Logged In: YES Ok, I didn't check ti in, but I disagree to close it! The problem was reported to me by an IronPort Python Here we go:
and it will definately step! With my patch, it works as expected. regards - chris |
Logged In: YES Can you be more specific in your example? |
Logged In: YES # test program for bdb buglet. # then, in the debugger, type "b 13": def test():
a=0
a=1
a=2
a=3
a=4
a=5
a=6
a=7
a=8
a=9 # the breakpoint will be at "a=4" |
Logged In: YES OK, you convinced me. Do you want to check it in or should And thanks for this solution! (I tried this in IDLE, and |
Logged In: YES Checked in as bdb.py 1.38/1.39 for current (fixed whitespace), Hopefully I got it right. Closing. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: