Message170301
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). |
|
Date |
User |
Action |
Args |
2012-09-11 13:09:40 | brett.cannon | set | recipients:
+ brett.cannon, exarkun, eric.snow |
2012-09-11 13:09:40 | brett.cannon | set | messageid: <1347368980.79.0.300695408958.issue15911@psf.upfronthosting.co.za> |
2012-09-11 13:09:40 | brett.cannon | link | issue15911 messages |
2012-09-11 13:09:39 | brett.cannon | create | |
|