I am new to VScode and want to run Python in it for my college project. I have seen that in VScode all the programmes are executed in Windows PowerShell Terminal(By default). But the problem is that it also shows the file address which is being executed which I don't want. So, please could you give a suggestion which software should be used in the terminal which only executes code and doesn't show any file address. And How can I change it?
CodePudding user response:
ctrl shift ` is a Command Used to open terminal in VS code .. You can also Try Extension of python shell or powershell in VSCode ...
CodePudding user response:
VS code supports multiple shells. By default it's powershell (PS >) on windows
Click on "Select Default Profile" to change it (And restart VS code) or you can directly click on any of the available shells (shown in below pic).
About hiding the "file address" - you can always change the shell's corresponding settings file which it reads on load.
Ex: bash shell uses .bashrc settings file. And how to hide file path could be checked here for bash :
CodePudding user response:
You can try the extension of Code Runner
, it will be like this:
Otherwise, you can change the value of "console" in the launch.json file to the internalConsole
, then run the python file in the debug mode(F5), it will be like this: