Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

manual set ipdb shell to vi mode work in linux but escape char wrong in windows #252

Open
WillDawnlll opened this issue Jun 29, 2022 · 1 comment
Labels

Comments

@WillDawnlll
Copy link

i add one line in ipdb main.py _get_debugger_cls to use command vi mode when debug ipdb.set_trace, and this work good in linux

def _get_debugger_cls():
    shell = get_ipython()
    #shell=None
    if shell is None:
        # Not inside IPython
        # Build a terminal app in order to force ipython to load the
        # configuration
        ipapp = TerminalIPythonApp()
        # Avoid output (banner, prints)
        ipapp.interact = False
        ipapp.initialize(["--no-term-title"])
        shell = ipapp.shell


######################add line
        shell.editing_mode='vi'
    else:

but when i do same thing in windows , vi mode prompt broke, and print some char like ?[6 qipdb> list?[2 q?[2 ?[2 q
it look like some cursor control escape char i think....
and this both happen in cmd and powershell , but when create cmd in ConEmu , ipdb vi mode work great
is there some config i set wrong ?
or other nomal way to config vi mode in ipdb?

@gotcha
Copy link
Owner

gotcha commented Dec 13, 2022

ipdb is a light wrapper around the IPython debugger.

You should ask this question on IPython repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants