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

Allow for hiding of "Run or Debug..." menu via setting #24258

Closed
dmalan opened this issue Oct 6, 2024 · 1 comment
Closed

Allow for hiding of "Run or Debug..." menu via setting #24258

dmalan opened this issue Oct 6, 2024 · 1 comment
Assignees
Labels
feature-request Request for new features or functionality triage-needed Needs assignment to the proper sub-team

Comments

@dmalan
Copy link

dmalan commented Oct 6, 2024

Just wanted to re-surface #21562, wherein we proposed a setting via which the "Run or Debug..." menu could be hidden, as I'm afraid I overlooked @brettcannon's reply there:

It seems the biggest issue the Run button causes you is that execution ends in a working terminal. Is that a fair assessment? If so, then would making it so the Run button doesn't lead to a terminal resolve your issue?

In educational contexts, the biggest issue for us is actually that the button is at odds with a pedagogical goal: to ensure that students develop muscle memory using their terminal window, rather than (rationally but educationally suboptimally) adopting a habit of clicking that button instead to run their first Python programs.

Using our own devcontainer.json file for students in Codespaces (via https://cs50.dev), we actually go to great lengths in @cs50 to simplify VS Code's UI in order to scaffold students' learning, hiding UI elements that they don't need (and might otherwise distract or confuse) at semester's start, while still allowing them to re-enable the same manually over time. Cf. https://cs50.dev/devcontainer.json.

We gather from @luabud's comment at #9633 (comment) that the Python extension is now using the VS Code API for the play button, but, per #21562, @gjsjohnmurray actually proposed that:

The Python extension devs ought to be able to add a boolean setting which will do this, e.g. python.showRunAndDebugInEditorTitle, default it to true, then extend the two when clauses here:

vscode-python/package.json

Lines 1946 to 1959 in 2f592d0

"editor/title/run": [
{
"command": "python.execInTerminal-icon",
"group": "navigation@0",
"title": "%python.command.python.execInTerminalIcon.title%",
"when": "resourceLangId == python && !isInDiffEditor && !virtualWorkspace"
},
{
"command": "python.debugInTerminal",
"group": "navigation@1",
"title": "%python.command.python.debugInTerminal.title%",
"when": "resourceLangId == python && !isInDiffEditor && !virtualWorkspace"
}
],

by appending && config.python.showRunAndDebugInEditorTitle to each of them. See doc.

Might a solution along those lines indeed resonate? As @blhvse also noted in #8837 (comment):

As an instructor that uses python in introductory college courses I would also really like this feature. It would allow me to control how quickly students gain exposure to the higher level features of VS Code by forcing them to run via the command line earlier on.

Thank you!

Screenshots

Screenshot 2024-10-05 at 9 58 57 PM

Screenshot 2024-10-05 at 9 58 51 PM

Related

#6921, #7034,
#8837, #9633

CC @rongxin-liu @lostintangent

@dmalan dmalan added the feature-request Request for new features or functionality label Oct 6, 2024
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Oct 6, 2024
@karthiknadig karthiknadig self-assigned this Oct 8, 2024
@eleanorjboyd
Copy link
Member

Thank you for submitting your feature request and everyone who considered it! Unfortunately, this issue did not receive enough votes over the allotted time, and so we are closing the issue. PRs are welcome so you can create a PR that fixes this if you are passionate about getting this feature across the finish line. Thanks!

@eleanorjboyd eleanorjboyd closed this as not planned Won't fix, can't repro, duplicate, stale Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

3 participants