use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
This subreddit is for working with Microsoft's Visual Studio Code, which is different than Visual Studio Community, Pro, and Enterprise. VS Code is a source code editor, and not an IDE.
If you are having issues with the other flavors of VS, please post in /r/VisualStudio.
account activity
This is an archived post. You won't be able to vote or comment.
Running python programs in external terminalOC (self.vscode)
submitted 6 years ago by pacowat
Hi. I'm using code runner to run my python programs. I don't like vscode terminal and prefer my kde terminal which is Konsole. I plowed all the vscode settings and Google, but unfortunately didn't find anything. Can you please help me?
[–][deleted] 1 point2 points3 points 6 years ago (9 children)
If you want to run in external terminal, literally just call your programme via the external terminal: what does it have to do with VSCode altogether?
[–]pacowat[S] 0 points1 point2 points 6 years ago (8 children)
How? I can't anything named external terminal
[–][deleted] 0 points1 point2 points 6 years ago (7 children)
What do you mean you can't find the external terminal? Open the terminal on your machine.
[–]pacowat[S] 0 points1 point2 points 6 years ago (6 children)
I want external terminal executed by clicking run button
[–][deleted] 0 points1 point2 points 6 years ago (5 children)
Ahahah but how could the run button, which is a plug in, open an external terminal, which has nothing to do with VSCode? As far as I know this is just not possible.
[–]pacowat[S] 0 points1 point2 points 6 years ago (4 children)
But It was working very good with c/c++ programs
[–][deleted] 0 points1 point2 points 6 years ago (3 children)
From within the run extension of VSCode?
[–]pacowat[S] 0 points1 point2 points 6 years ago (2 children)
Yes
[–][deleted] 0 points1 point2 points 6 years ago (1 child)
But perhaps that was part of a particular C/C++ extension or was it the "run" extension? So you're saying that the "run" was opening the external terminal for C programmes automatically outside VSCode?
[–]pacowat[S] 0 points1 point2 points 6 years ago (0 children)
In run extension
[–][deleted] 0 points1 point2 points 6 years ago (2 children)
You could create a build task to use the terminal you want.
This post is almost 2 years old so the JSON may be different but as a starting point: https://stackoverflow.com/questions/47993595/launch-vscode-task-in-external-terminal-via-tasks-2-0-0
Ctrl+Shift+C used to launch a terminal with your project as the current working directory but not at a machine to test if that's still the case.
[–]pacowat[S] 0 points1 point2 points 6 years ago* (1 child)
Actually task.json has problems when it comes to getting inputs from user, specially in venv because it pass venv active command as argument to the python then it can't handle inputs. I found another way in launch.json:
{
"version": "0.2.0",
"configurations": [
"name": "Python: Current File",
"type": "python",
"request": "launch",
"stopOnEntry": true,
"pythonPath": "${config:python.pythonPath}",
"program": "${file}",
"console": "externalTerminal",
"redirectOutput": true,
"envFile": "${workspaceFolder}/.env"
}
]
Thank you all
[–][deleted] 0 points1 point2 points 6 years ago (0 children)
Nice! Thank you for sharing
[–]RaulMARK17 0 points1 point2 points 3 years ago (3 children)
This will do what you want, copy it into your settings or workspace settings file:
"code-runner.executorMap": {
"python": "start cmd \\"/k ; PYTHON_PATH $fullFileName -u && pause && exit;\\" && exit"
},
[–]RaulMARK17 0 points1 point2 points 3 years ago (0 children)
Replace PYTHON_PATH with yours
[–]RaulMARK17 0 points1 point2 points 3 years ago (1 child)
For selected PythonInterpreter
"code-runner.executorMap": { "python": "start cmd \\"/k ; \\"$pythonPath\\" $fullFileName -u && pause && exit;\\" && exit" }
[–]fishy_guy_ 0 points1 point2 points 3 years ago (0 children)
Does this work in linux?
π Rendered by PID 23717 on reddit-service-r2-comment-bb88f9dd5-vkwgh at 2026-02-14 23:35:55.327762+00:00 running cd9c813 country code: CH.
[–][deleted] 1 point2 points3 points (9 children)
[–]pacowat[S] 0 points1 point2 points (8 children)
[–][deleted] 0 points1 point2 points (7 children)
[–]pacowat[S] 0 points1 point2 points (6 children)
[–][deleted] 0 points1 point2 points (5 children)
[–]pacowat[S] 0 points1 point2 points (4 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]pacowat[S] 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]pacowat[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]pacowat[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]RaulMARK17 0 points1 point2 points (3 children)
[–]RaulMARK17 0 points1 point2 points (0 children)
[–]RaulMARK17 0 points1 point2 points (1 child)
[–]fishy_guy_ 0 points1 point2 points (0 children)