Brett Cannon added the comment: I'm going to guess this is a shortcoming of pdb when it comes to frozen modules as I can get to the source using inspect (which pdb leans on)::
>>> len(inspect.findsource(_frozen_importlib)[0]) 1761 >>> len(inspect.findsource(importlib._bootstrap)[0]) 1761 Which are accurate line counts:: $ wc Lib/importlib/_bootstrap.py 1761 6236 62517 Lib/importlib/_bootstrap.py So why gdb can't output the source line when it has the line number of the file I don't know when it can already get access to the source without issue. And yes, debugging imports are hard. =) Still, it's better than before as you can easily toss in a print statement or two and then just regenerate the frozen object. But I do agree it would be nice to get gdb to play along with the whole situation (and thus the title change for this bug). ---------- nosy: +brett.cannon stage: -> test needed title: Debugging import problems is hard -> can't step through _frozen_importlib/importlib._bootstrap using gdb type: -> behavior versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15911> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com