Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


-color settings ignored whitin ipdb #1

brickZA opened this Issue · 4 comments

2 participants


I originally reported this issue as an ipython bug, but it looks like may be possible to fix it by making changes to ipdb. See ipython/ipython#279


I'll take care of this asap.


In ipython/ipython#279, you state :

OK. So if I do ipape.get().options.colors in a straight ipython shell, it gives the right answers. Then I instrumented ipdb to print the
same info, and it always gave Linux. Then I saw the following lines in ipdb/

from IPython.Shell import IPShell
shell = IPShell(argv=[''])

By commenting out the the last line, the correct info is obtained by ipdb. Presumably a new ipython shell with default options is
created by the IPShell() statement. Why would ipdb do this? A quick smoke test seems to indicate that ipdb works OK without it.

P.S. the ipdb file I have matches this one:


As soon as I commented the line you mention,

I got

Traceback (most recent call last):
  File "", line 11, in <module>
  File "", line 7, in main
    import ipdb; ipdb.set_trace()
  File "/Users/gotcha/tmp/ipdbrel/lib/python2.6/site-packages/ipdb/", line 11, in set_trace
    def_colors = ip.options.colors
AttributeError: 'NoneType' object has no attribute 'options'

This made me think that I do not use ipdb the same way as you do.

I guess that you are actually using ipdb from inside IPython.

If this is correct, my last commit should fix the issue.

Can you confirm ?


Indeed, I run it from within IPython. It also seems to work correctly with your latest revision.

@gotcha gotcha closed this issue from a commit
@gotcha fix changelog
closes #1
@gotcha gotcha closed this in 5644ea9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.