1

I'm writing basic scripts in VS Code and when I run them the result in the terminal is just..... ugly. Instead of just printing the result of my code, it prints details about my version of Windows, a little copyright notice, the full file path to my code... then eventually gets round to executing my actual code.

Is there any way for me to configure the terminal so that it just shows my code and not all the other bits? I've already seem about an extension called Code Runner, but this prints to the "Output" tab and doesn't allow any user input

1
  • Can u explain how do you run them? Are you refering to debugging? Commented Aug 10, 2021 at 23:45

5 Answers 5

1

If you are using PowerShell, you can add "args": ["-NoLogo"], like this to Hides the copyright banner at startup :

  "terminal.integrated.defaultProfile.windows": "PowerShell",
  "terminal.integrated.profiles.windows": {
    "PowerShell": {
      "source": "PowerShell",
      "icon": "terminal-powershell",
      "path": ["C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"],
      "args": ["-NoLogo"],
    }
  },

And you also can change the value of console in the launch.json file. But internalConsole does not accept the user input. And externalTerminal will prompt a cmd window out of the VSCode.

Sign up to request clarification or add additional context in comments.

Comments

0

Maybe you can try Jupyter code cells: https://code.visualstudio.com/docs/python/jupyter-support-py

Comments

0

Try jupyter on visual studio code interface

https://code.visualstudio.com/docs/datascience/jupyter-notebooks

Comments

0
  • go to settings
  • search for terminal
  • find Code-runner : Run in Terminal and turn that off.

Comments

0

You have to follow these steps:

  1. install python extension for vs code. python extension

  2. After installing reopen vs code and you will see a play button at right-top corner.

    play button

  3. Click that button and run your code!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.