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: Transition Debugger plugin actions to the new Run architecture and cleanup Editor plugin #20557

Merged
merged 20 commits into from
Feb 20, 2023

Conversation

impact27
Copy link
Contributor

@impact27 impact27 commented Feb 19, 2023

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 the Run plugin for the debugger
  • move run settings from editor config to run config
  • make run_cell_copy work with the debugger by appending %%debug to the cell copy
  • Added buttons in the debugger plugin to start debugging from the debugger plugin
  • remove legacy run functions and signals from the editor plugin
  • remove focus_to_editor option that was now mostly unused ("Maintain focus in the editor" option has no effect when running cells #17028 and Editor loses cursor focus after running cell when IPython console is detached #3221 are still ok) (It was a strange option anyway because focus_to_editor means "do nothing" and not focus_to_editor means focus to the console)
  • move debug-specific code from ipyconsole run function to the debugging plugin
  • run_cell doesn't have to deal with run_cell_copy because the copy is run as a selection
  • separate extra actions and context modifier (from line is not an extra action but a modifier)

Issue(s) Resolved

Fixes #

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:

@impact27
Copy link
Contributor Author

@ccordoba12 This is ready for review

@impact27 impact27 force-pushed the debug_plugin_to_run branch 3 times, most recently from e27f9a9 to 8590ecf Compare February 19, 2023 10:25
Add context modificator
@impact27 impact27 force-pushed the debug_plugin_to_run branch from 8590ecf to a710788 Compare February 19, 2023 10:33
@ccordoba12
Copy link
Member

ccordoba12 commented Feb 19, 2023

Quick review:

Added buttons in the debugger plugin to start debugging from the debugger plugin

I don't like this change because it makes the interface more complicated and crowded, and the toolbar of the Debugger plugin doesn't look good now:

image

So, please revert it.

Instead, I'd like to add the "Stop debugging" button (i.e. the blue square one) to the main toolbar, because I think it's missing to quickly stop debugging.

remove focus_to_editor option that was now mostly unused

What happens now if the user wants to run/debug something and move the focus automatically to the IPython console?

@impact27
Copy link
Contributor Author

What happens now if the user wants to run/debug something and move the focus automatically to the IPython console?

This feature doesn't work in the master now, and I am not sure why the user would want the focus to jump around. Wouldn't it make more sense to keep the focus where it is? What would be the usecase if that feature was fixed?

@impact27
Copy link
Contributor Author

@ccordoba12 I reverted it:
Screenshot 2023-02-19 at 19 25 24
You can launch from the debugger toolbar or the menu

@ccordoba12
Copy link
Member

This feature doesn't work in the master now

Yeah, I forgot about it. Then it's fine to remove that option.

@ccordoba12 ccordoba12 changed the title Transition Debugger plugin to the Run plugin and cleanup editor Plugin PR: Transition Debugger plugin actions the Run plugin and cleanup Editor plugin Feb 19, 2023
@ccordoba12 ccordoba12 changed the title PR: Transition Debugger plugin actions the Run plugin and cleanup Editor plugin PR: Transition Debugger plugin actions to the Run plugin and cleanup Editor plugin Feb 19, 2023
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 @impact27 for your work on this!

Co-authored-by: Carlos Cordoba <ccordoba12@gmail.com>
@impact27 impact27 force-pushed the debug_plugin_to_run branch from 07f6ced to 9db27eb Compare February 20, 2023 03:32
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.

This looks almost ready, thanks @impact27!

Besides my small suggestions, please also remove the QGroupBox highlighted in the red square below

image

Since the tab on which it's placed has the same name, it's a bit redundant to have that QGroupBox now.

@ccordoba12
Copy link
Member

One more thing: I noticed that you removed the force_wdir kwarg and I'd like to ask you: why is that not necessary anymore? I thought we needed something like that to run local code in remote kernels.

@impact27 impact27 force-pushed the debug_plugin_to_run branch from f07db98 to d9440eb Compare February 20, 2023 19:50
@impact27
Copy link
Contributor Author

impact27 commented Feb 20, 2023

One more thing: I noticed that you removed the force_wdir kwarg and I'd like to ask you: why is that not necessary anymore? I thought we needed something like that to run local code in remote kernels.

All the logic is now in run_script

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.

Looks good to me now, thanks @impact27!

@ccordoba12 ccordoba12 merged commit 8dc6d18 into spyder-ide:master Feb 20, 2023
@ccordoba12 ccordoba12 changed the title PR: Transition Debugger plugin actions to the Run plugin and cleanup Editor plugin PR: Transition Debugger plugin actions to the new Run architecture and cleanup Editor plugin Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants