We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1f3af7 commit 3acb643Copy full SHA for 3acb643
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