from icecream import ic
breakpoint()
ic(len)
ic(sum)
Stepping through the lines with n, everything works fine:
$ python script.py
> script.py(3)<module>()
-> ic(len)
(Pdb) n
ic| len: <built-in function len>
> script.py(4)<module>()
-> ic(sum)
(Pdb)
ic| sum: <built-in function sum>
--Return--
> script.py(4)<module>()->None
-> ic(sum)
(Pdb) c
But if I immediately continue with c, it fails on the second ic() call.
$ python script.py
> script.py(3)<module>()
-> ic(len)
(Pdb) c
ic| len: <built-in function len>
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?
Example script:
Stepping through the lines with
n
, everything works fine:But if I immediately continue with
c
, it fails on the second ic() call.