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

PR: Use '!' for Pdb commands and add other options to control the debugger (IPython console) #12134

Merged
merged 22 commits into from Oct 24, 2020

Conversation

impact27
Copy link
Contributor

@impact27 impact27 commented Apr 4, 2020

Description of Changes

  • Wrote at least one-line docstrings (for any new functions)
  • Added unit test(s) covering the changes (if testable)
  • Included a screenshot or animation (if affecting the UI, see Licecap)

Use '!' before Pdb commands and nothing before python code, as is the case in IPython

Issue(s) Resolved

Depends on spyder-ide/spyder-kernels#214

Affirmation

By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct:

@pep8speaks

This comment has been minimized.

@impact27 impact27 changed the title Separate cmd input Separate pdb input Apr 4, 2020
@impact27 impact27 changed the title Separate pdb input Separate pdb input from general IO Apr 4, 2020
@impact27 impact27 closed this Apr 4, 2020
@impact27 impact27 reopened this Apr 4, 2020
@impact27 impact27 closed this Apr 5, 2020
@impact27 impact27 reopened this Apr 5, 2020
@impact27 impact27 changed the title Separate pdb input from general IO Separate pdb input from general IO and cleanup debugging.py Apr 5, 2020
@impact27 impact27 force-pushed the separate_cmd_input branch 3 times, most recently from 046437b to df406e9 Compare May 22, 2020 08:00
@impact27 impact27 changed the title Separate pdb input from general IO and cleanup debugging.py Separate pdb input from general IO May 25, 2020
@impact27
Copy link
Contributor Author

I switched commands and text because I am tired to have a variable named step that I can't use while debugging

so:

ipdb> step = 10

ipdb> step
10

ipdb> !step
> /usr/local/Cellar/python/3...

@impact27 impact27 force-pushed the separate_cmd_input branch 2 times, most recently from 74ddde9 to 7bc6561 Compare June 30, 2020 18:25
@impact27 impact27 changed the title Separate pdb input from general IO PR: Enhance PdB by using '!' for commands and showing matplotlib figures while debugging Jul 1, 2020
@impact27 impact27 force-pushed the separate_cmd_input branch 3 times, most recently from 47a6e56 to 21c44e4 Compare July 2, 2020 12:31
@impact27 impact27 closed this Jul 2, 2020
@impact27 impact27 reopened this Jul 2, 2020
@impact27 impact27 changed the title PR: Enhance PdB by using '!' for commands and showing matplotlib figures while debugging PR: Use '!' for Pdb commands [Depends on #13327] Jul 18, 2020
@impact27 impact27 force-pushed the separate_cmd_input branch 2 times, most recently from 0bd7791 to 3698b89 Compare July 24, 2020 06:49
@impact27
Copy link
Contributor Author

I removed the explore mode and replaced by spyder-ide/spyder-kernels@82617ad

This means typing "u" in the terminal will go up unless u is defined. So the code takes precedence on the commands rather than the other way around. This way pdb can be used in essentially the current way, but the conflicts resolve in favor of the code rather than the commands, which is more intuitive.

Quentin Peter and others added 7 commits October 13, 2020 08:02
@ccordoba12
Copy link
Member

This means typing "u" in the terminal will go up unless u is defined. So the code takes precedence on the commands rather than the other way around. This way pdb can be used in essentially the current way, but the conflicts resolve in favor of the code rather than the commands, which is more intuitive.

Great! That's a very nice and intuitive solution solution!

Thanks @impact27 for implementing it.

Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from the minor comment I left and fixing the merge conflict with our subrepo, I think this one is ready.

spyder/config/main.py Outdated Show resolved Hide resolved
Quentin Peter added 3 commits October 23, 2020 08:14
…/github.com/impact27/spyder-kernels.git external-deps/spyder-kernels

subrepo:
  subdir:   "external-deps/spyder-kernels"
  merged:   "97909c82f"
upstream:
  origin:   "https://github.com/impact27/spyder-kernels.git"
  branch:   "separate_cmd_input"
  commit:   "97909c82f"
git-subrepo:
  version:  "0.4.1"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "a04d8c2"
@impact27
Copy link
Contributor Author

Should this behaviour be the default? I think it makes sense as new users will be less surprised but could be a bit surprising for users that are used to pdb.

@ccordoba12
Copy link
Member

/show binder

@github-actions
Copy link

Binder 👈 Launch a Binder instance on this branch

@ccordoba12
Copy link
Member

ccordoba12 commented Oct 23, 2020

Should this behaviour be the default?

Yes, I totally agree.

I think it makes sense as new users will be less surprised but could be a bit surprising for users that are used to pdb.

Agreed too.

And what do you think if we give seasoned Pdb users a hint about what's happening, by showing a message like this?

Selección_032

Quentin Peter added 2 commits October 24, 2020 08:08
…com/impact27/spyder-kernels.git external-deps/spyder-kernels

subrepo:
  subdir:   "external-deps/spyder-kernels"
  merged:   "427046552"
upstream:
  origin:   "https://github.com/impact27/spyder-kernels.git"
  branch:   "separate_cmd_input"
  commit:   "427046552"
git-subrepo:
  version:  "0.4.1"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "a04d8c2"
@ccordoba12
Copy link
Member

@impact27, I think this is good to go now. Please resync our subrepo because I just merged PR spyder-ide/spyder-kernels#214.

…der-ide/spyder-kernels.git external-deps/spyder-kernels

subrepo:
  subdir:   "external-deps/spyder-kernels"
  merged:   "5e430c34b"
upstream:
  origin:   "https://github.com/spyder-ide/spyder-kernels.git"
  branch:   "1.x"
  commit:   "5e430c34b"
git-subrepo:
  version:  "0.4.1"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "a04d8c2"
@ccordoba12
Copy link
Member

Please merge with 4.x to fix the merge conflict.

@ccordoba12
Copy link
Member

ccordoba12 commented Oct 24, 2020

I did it myself because I need it to base another PR on top of this one. Sorry for the hassle.

Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @impact27 for this! Terrific addition!

@ccordoba12 ccordoba12 changed the title PR: Use '!' for Pdb commands PR: Use '!' for Pdb commands and add other options to control the deby (IPython console) Oct 24, 2020
@ccordoba12 ccordoba12 changed the title PR: Use '!' for Pdb commands and add other options to control the deby (IPython console) PR: Use '!' for Pdb commands and add other options to control the debugger (IPython console) Oct 24, 2020
@ccordoba12 ccordoba12 merged commit 6554746 into spyder-ide:4.x Oct 24, 2020
ccordoba12 added a commit that referenced this pull request Oct 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants