Skip to content

Conversation

@djplt
Copy link

@djplt djplt commented Oct 31, 2021

Make cursor focus switch automatically to the terminal after launching a python process with configuration option.
Closed #14851

@djplt
Copy link
Author

djplt commented Nov 28, 2021

Just wanted to clarify that modifying the package.json did not yield a modified package-lock.json.

@paulacamargo25 paulacamargo25 added the skip package*.json package.json and package-lock.json don't both need updating label Nov 29, 2021
@paulacamargo25
Copy link

Thanks for your PR, I see you added the focus only when the debugger is run. But the focus would be missing when the code is simply executed, in order to complete the issue. Could you add that part? Thanks

@djplt
Copy link
Author

djplt commented Feb 15, 2022

If you mean "Run" -> "Run Without Debugging", I've tested it and it focuses on the terminal. I think onDidStartDebugSession is a bit of a misnomer.

@paulacamargo25
Copy link

I mean "Run python file", this button, when you click on it, the terminal is not focused.
Screen Shot 2022-03-29 at 3 42 32 PM

@djplt
Copy link
Author

djplt commented Apr 12, 2022

Okay, thanks for the pointer. That's been done now!

@paulacamargo25 paulacamargo25 merged commit 902b410 into microsoft:main May 10, 2022
@RedMeaning
Copy link

I found related issues #14851 & #18813 however neither of those or this one mentioned the Settings to look for to enable this feature. As reference I would like to post the setting name to help other as I did find it by searching under menu item File| Preferences|Settings (item I found listed below)
Python > Terminal: Focus After Launch
When launching a python terminal, whether to focus the cursor on the Terminal

wesm pushed a commit to posit-dev/positron that referenced this pull request Mar 28, 2024
microsoft/vscode-python#17884)

* Make the cursor focus switch automatically to the terminal after launching a python process with configurability (microsoft/vscode-python#14851)

* Add focus on terminal to code execution manager
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip package*.json package.json and package-lock.json don't both need updating

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make the cursor focus automatically switch to the terminal after clicking the run button.

4 participants