[Python-ideas] pdb to support running modules

Mario Corchero mariocj89 at gmail.com
Thu Jan 4 14:56:41 EST 2018


Hello All,

Since PEP 338 <http://www.python.org/dev/peps/pep-0338/> we can run
python modules as a script via `python -m module_name` but there is no
way to run pdb on those (AFAIK).

The proposal is to add a new argument "-m" to the pdb module to allow
users to run `python -m pdb -m my_module_name`

This is especially useful when working on cli tools that use
entrypoints in setup.py, as there is no other way to run them.

I have a possible implementation here
https://github.com/python/cpython/pull/4752

I quite often use pdb with scripts, being able to run modules would be
useful as well. What do you think?

Regards!
Mario
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180104/6b7a8d18/attachment.html>


More information about the Python-ideas mailing list