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

ctrl-z does not suspend to background in debugger #10254

Closed
nonagonal opened this issue Feb 7, 2017 · 5 comments
Closed

ctrl-z does not suspend to background in debugger #10254

nonagonal opened this issue Feb 7, 2017 · 5 comments
Milestone

Comments

@nonagonal
Copy link

@nonagonal nonagonal commented Feb 7, 2017

I'm using IPython 5.2.2 under Ubuntu and within ipdb, ctrl-z no longer suspends the process.

It looks like the problem is that in terminal/debugger.py, the call to create_prompt_application is not passing enable_system_bindings=True, so prompt_toolkit is not enabling the shortcut ctrl-z -> suspend process.

Would it be possible to have system bindings enabled? From the prompt toolkit source it looks like this simply enabled ctrl-z on systems which support suspending the process. The only other side effects I see are applicable only in emacs and vi modes (where other system shortcuts are enabled).

@takluyver
Copy link
Member

@takluyver takluyver commented Feb 7, 2017

You're always in one of emacs or vi modes (emacs is the default, vi is an option), so I'd like to know what the other ones are before doing this. If it's too much, we can just set a shortcut for Ctrl-Z specifically.

@nonagonal
Copy link
Author

@nonagonal nonagonal commented Feb 8, 2017

Aha I didn't realize you're always in one of those modes. There's indeed a few more then (from prompt_toolkit/key_binding/bindings/emacs.py): meta-! to open system prompt, esc/ctrl-g/ctrl-c to cancel it, ctrl-j to run a system command.

@takluyver
Copy link
Member

@takluyver takluyver commented Feb 8, 2017

OK, I think in that case I'd rather just enable Ctrl-Z. PR coming up.

@nonagonal
Copy link
Author

@nonagonal nonagonal commented Feb 8, 2017

Awesome, thanks! Apologies for my ignorance but should I close the issue or will someone else do that at a later time?

@takluyver
Copy link
Member

@takluyver takluyver commented Feb 8, 2017

No problem - it will get closed automatically when someone merges the PR.

meeseeksdev bot pushed a commit that referenced this issue Feb 9, 2017
@Carreau Carreau modified the milestone: no action May 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.