ipdb: Starting ipdb inside ipython breaks color coding (windows)
Scenario:
- Run ipython (in windows), import and run a method that includes a call to ipdb (i just included
import ipdb; ipdb.set_trace()
inside a method that i imported in this case django’smakemessages.py
) - Debugger starts but all the color coding is output as raw strings, like so:
> ←[1;32mc:\users\big\envs\appricot\lib\site-packages\django\core\management\commands\makemessages.py←[0m(184)←[0;36mprocess_file←
[1;34m()←[0m
←[1;32m 183 ←[1;33m ←[1;32mimport←[0m ←[0mipdb←[0m←[1;33m;←[0m ←[0mipdb←[0m←[1;33m.←[0m←[0mset_trace←[0m←[1;33m(←[0m←[1;
33m)←[0m←[1;33m←[0m←[0m
←[0m←[1;32m--> 184 ←[1;33m ←[0mthefile←[0m ←[1;33m=←[0m ←[0mfile←[0m←[1;33m←[0m←[0m
←[0m←[1;32m 185 ←[1;33m ←[0morig_file←[0m ←[1;33m=←[0m ←[0mos←[0m←[1;33m.←[0m←[0mpath←[0m←[1;33m.←[0m←[0mjoin←[0m←[1;33m
(←[0m←[0mdirpath←[0m←[1;33m,←[0m ←[0mfile←[0m←[1;33m)←[0m←[1;33m←[0m←[0m
←[0m
ipdb>
Edit: Just to clarify, my issue is reproducible on the first ipdb run, just by entering ipython and importing any module (sample.py) which includes the line import ipdb;ipdb.set_trace()
About this issue
- Original URL
- State: closed
- Created 12 years ago
- Reactions: 1
- Comments: 21 (5 by maintainers)
Commits related to this issue
- fix color break when ipdb is imported twice, see https://github.com/gotcha/ipdb/issues/31 — committed to apelliciari/ipdb by deleted user 10 years ago
Released in https://pypi.python.org/pypi/ipdb/0.8.1