This is a known issue when stepping into an import. Your code is in
the import machinery, which doesn't have source code. The stack viewer
shows what module it is in.
For now, if you want to debug lines in a module as it is importing,
the easiest way is to set a breakpoint in the module. The module
viewer (m) imports a module, so you'll need to set a breakpoint then
restart pudb to actually hit it.
On Sun, Aug 11, 2019 at 10:11 PM Andreas Kloeckner
> "Haroldo Gambini Santos" <haroldo(a)ufop.edu.br> writes:
> > I'm trying to debug a python module, but when I try to step into a line:
> > from mip.gurobi import SolverGurobi
> > I got the message:
> > <no source code available>
> > If this is generated code and you would like the source code to show up here,
> > add it to linecache.cache, like
> > import linecache
> > linecache.cache[filename] = (size, mtime, lines, fullname)
> > You can also set the attribute _MODULE_SOURCE_CODE in the module in which this
> > was compiled to a string containing the code.
> > Linecache.cache is a config file ?
> > This is strange, other debuggers seem to work (kdevelop),
> > Could anyone help me ?
> Linecache is part of the Python standard library:
> It's hard to help you with your situation without more details. What
> module are you trying to examine? How was it installed? Do you get the
> right file name if you execute 'print(module.submodule.__file__)'? If
> not, any idea why not? What's your Python version?
> Pudb mailing list -- pudb(a)tiker.net
> To unsubscribe send an email to pudb-leave(a)tiker.net