Open alexmojaki opened 3 years ago
When ic() doesn't work it just says:
ic| Error: Failed to access the underlying source code for analysis. Was ic() invoked in a REPL (e.g. from the command line), a frozen application (e.g. packaged with PyInstaller), or did the underlying source code change during execution?
To make ic() usable in cases where the same code works under some conditions but not others (e.g. in https://github.com/gruns/icecream/issues/95#issuecomment-874344435 where it doesn't work with pdb but works otherwise), I think it should:
snoop.pp
import snoop exec("snoop.pp(1+2)") exec("snoop.pp(3+4, 5+6)")
00:12:53.21 LOG: 00:12:53.21 .... <argument> = 3 00:12:53.21 LOG: 00:12:53.21 .... <argument 1> = 7 00:12:53.21 .... <argument 2> = 11
Perhaps it could also automatically act as if includeContext=true in such cases to compensate for the missing argument source.
When ic() doesn't work it just says:
To make ic() usable in cases where the same code works under some conditions but not others (e.g. in https://github.com/gruns/icecream/issues/95#issuecomment-874344435 where it doesn't work with pdb but works otherwise), I think it should:
snoop.pp
, e.g:Perhaps it could also automatically act as if includeContext=true in such cases to compensate for the missing argument source.