We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 790ff6b commit e0ac654Copy full SHA for e0ac654
Lib/pdb.py
@@ -109,7 +109,7 @@ def find_function(funcname, filename):
109
110
def getsourcelines(obj):
111
lines, lineno = inspect.findsource(obj)
112
- if inspect.isframe(obj) and obj.f_globals is obj.f_locals:
+ if inspect.isframe(obj) and obj.f_code.co_name == "<module>":
113
# must be a module frame: do not try to cut a block out of it
114
return lines, 1
115
elif inspect.ismodule(obj):
0 commit comments